N,A,H,M,S = map(int,input().split()) t = (23-H)*3600 + (59-M)*60 + (60-S) if t <= N*A: print ("Yes") else: print ("No")