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){ m-=60;h++; } } System.out.println(h); System.out.println(m); } }