import sys input = sys.stdin.readline mod = 998244353 H, M = map(int, input().split()) if H < 7: print("Yes") elif H == 7: if M < 30: print("Yes") else: print("Late") elif H == 8: if M < 30: print("Late") else: print("No") else: print("No")