H,M=map(int,input().split()) if 0<=H<=6: print("Yes") elif H >= 9: print("No") elif H ==7: if M >= 30: print("Late") else: print("Yes") else: if M >= 30: print("No") else: print("Late")