#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main(){

    int H, M;
    cin >> H >> M;
    if (H < 7) cout << "Yes" << endl;
    else if (H == 7){
        if (M<30) cout << "Yes" << endl;
        else cout << "Late" << endl;
    }
    else if (H == 8){
        if (M<30) cout << "Late" << endl;
        else cout << "No" << endl;
    }
    else cout << "No" << endl;

    return 0;
}