#include #include int main(){ int n,h,m,t; int i,j; scanf("%d%d%d%d",&n,&h,&m,&t); for(i=0;i=60){ m=m%60; } if(h>=24){ h=h%24; m=m%60; } /*printf("%d %d\n",h,m); sleep(1000);*/ } printf("%d\n%d\n",h,m); return 0; }