#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(ll i=0;i> N >> A >> H >> M >> S; if(S+60*M+3600*H+N*A>=24*60*60) cout << "Yes" << endl; else cout << "No" << endl; return 0; }