#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,A,H,M,S; cin >> N >> A >> H >> M >> S; int left = (24-H)*3600; left -= 60*M+S; if(left <= N*A) cout << "Yes\n"; else cout << "No\n"; }