H,M=map(int,input().split())
if H<=6:
    print('Yes')
elif H==7 and M<30:
    print('Yes')
elif H==7 or (H==8 and M<30):
    print('Late')
else:
    print('No')