```cpp
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d,cha;
cin>>a>>b>>c>>d;
cha=(c*60+d)-(a*60+b);
cout<<cha/60<<' ';
if(cha%60!=0) cout<<(cha%60)<<endl;
return 0;
}
```
by gxlyoufuxijie @ 2017-07-23 14:32:33