#include #include #include using namespace std; struct FastInput { inline FastInput& operator>>(int& x) { x = 0; char c = getchar_unlocked(); while (c < '0' || c > '9') c = getchar_unlocked(); while (c >= '0' && c <= '9') { x = (x << 3) + (x << 1) + (c - '0'); c = getchar_unlocked(); } return *this; } } fast_in; inline void fast_print(bool condition) { if (condition) fwrite("Yes\n", 1, 4, stdout); else fwrite("No\n", 1, 3, stdout); } void solve() { int n, a, h, m, s; fast_in >> n >> a >> h >> m >> s; const int SECONDS_IN_DAY = 24 * 60 * 60; int current_total = h * 3600 + m * 60 + s; int added_total = n * a; fast_print(current_total + added_total >= SECONDS_IN_DAY); } int main() { solve(); return 0; }