N,A,H,M,S=map(int,input().split()) if (H*60+M)*60+S+N*A<24*60*60: R='No' else: R='Yes' print(R)