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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    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";
    }
}