#include using namespace std; int main(){ int H,M; cin >> H >> M; int time = H*60+M; if(time <450) { cout << "Yes" << endl; }else if (time<510) { cout << "Late" << endl; }else { cout << "No" << endl; } }