#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <cstring>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < int(n);i++)

int main(){
  int h,m;
  cin >> h >> m;
  if (h*60+m < 7*60+30){
    cout << "Yes\n";
  }
  else if (h*60+m >= 8*60+30){
    cout << "No\n";
  }
  else{
    cout << "Late\n";
  }

  return 0;
}