#include <bits/stdc++.h>
#include "atcoder/modint"

using i64 = long long;
using Fp = atcoder::modint998244353;

int main() {
    int H, M;
    std::cin >> H >> M;
    int v = (H * 60 + M) * 60 + 30;
    int l = (7 * 60 + 30) * 60;
    int u = (8 * 60 + 30) * 60;
    if (v < l) std::cout << "Yes" << std::endl;
    else if (l <= v and v < u) std::cout << "Late" << std::endl;
    else std::cout << "No" << std::endl;
}