#include using namespace std; int main(void) { int N, A, H, M, S; cin >> N >> A >> H >> M >> S; S += N * A; M += S / 60; H += M / 60; cout << (H >= 24 ? "Yes" : "No") << "\n"; return 0; }