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