h,m = map(int,input().split()) d = h*3600+m*60+30 l = 7*3600+30*60 r = l + 3600 if d < l: print("Yes") elif d <= r: print("Late") else: print("No")