import java.util.Scanner; public class Main{ private static Scanner sc=new Scanner(System.in); public static void main(String args[])throws Exception{ int n=sc.nextInt(),h=sc.nextInt(),m=sc.nextInt(),t=sc.nextInt(); for(int i=0;i=60){ h++;m-=60; }while(h>=24){ h-=24; } } System.out.println(h); System.out.println(m); } }