#include using namespace std; int main(void){ //input int N,H,M,T; cin >> N >> H >> M >> T; //calc for(int i=1;i= 60){ H += 1; M = 0; } if(H >= 24) H = 0; } //output cout << H << endl << M << endl; }