H,M = map(int,input().split()) if 0<=H<=6 or (H==7 and 0<=M<=29): print("Yes") elif (H==7 and 30<=M<=59) or (H==8 and 0<=M<=29): print("Late") else: print("No")