#include <bits/stdc++.h>
using namespace std;
auto main() -> int {
    int h, m;
    cin >> h >> m;
    bool ok = h <= 6 || (h == 7 && m < 30);
    bool late = (h == 7 && m >= 30) || (h == 8 && m < 30);
    if (ok) {
        cout << "Yes";
    } else if (late) {
        cout << "Late";
    } else {
        cout << "No";
    }
    cout << '\n';
}