h,m = map(int,input().split()) if h < 7: print('Yes') elif h==7: print('Yes' if m<30 else 'Late') elif h==8: print('Late' if m<30 else 'No') else: print('No')