N,A,H,M,S=map(int,input().split()) print("YNeos"[N*A<86400-3600*H-60*M-S::2])