#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int h, m;
    cin >> h >> m;
    if(h < 7 || (h == 7 && m < 30)){
        cout << "Yes\n";
    }else if(h == 7 || (h == 8 && m < 30)){
        cout << "Late\n";
    }else{
        cout << "No\n";
    }
}