exam_hour = int(input()) exam_minute = int(input()) arrival_hour = int(input()) arrival_minute = int(input()) exam_time = (exam_hour * 60) + exam_minute arrival_time = (arrival_hour * 60) + arrival_minute if exam_time == arrival_time: print("On time") elif exam_time > arrival_time: result = exam_time - arrival_time if result <= 30: print("On time") print(f'{result} minutes before the start') elif 30 < result < 60: print("Early") print(f'{result} minutes before the start') if result >= 60: print("Early") h = result / 60 m = result % 60 if m <= 9: print(f'{int(h)}:0{m} hours before the start') else: print(f'{int(h)}:{m} hours before the start') elif arrival_time > exam_time: result = arrival_time - exam_time if result < 60: print("Late") print(f'{result} minutes after the start') elif result >= 60: print("Late") h = result / 60 m = result % 60 if m <= 9: print(f'{int(h)}:0{m} hours after the start') else: print(f'{int(h)}:{m} hours after the start')