h, m = map(int, input().split()) if h < 7: 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")