import sys input = sys.stdin.readline N,A,H,M,S=map(int,input().split()) now=H*60*60+M*60+S rest=24*60*60-now if A*N>=rest: print("Yes") else: print("No")