N, A, H, M, S = map(int, input().split()) time1 = A*N time2 = 3600*(24-H) time2 -= M*60 time2 -= S print("Yes" if time1 >= time2 else "No")