#include<iostream> #include<iomanip> #include<cmath> #include<string> int a,b,c,d,t1,t2,t; int main() { cin >> a >> b >> c >> d; t1 = a * 60 + b; t2 = c * 60 + d; t = t2 - t1; cout << t / 60 << " " << t % 60 << endl; return 0; }