h,m = map(int,input().split()) st1 = 3600*7+60*30 st2 = 3600*8+60*30 num = 3600*h+60*m+30 if num < st1: print("Yes") elif st1 < num < st2: print("Late") else: print("No")