H, W = map(int, input().split()) tmp = H * 60 * 60 + W * 60 + 30 line1 = 7 * 60 * 60 + 30 * 60 line2 = 8 * 60 * 60 + 30 * 60 if tmp <= line1: print("Yes") elif line1 < tmp <= line2: print("Late") else: print("No")