#include #define rep(i,n) for(int i=0;i<(n);++i) #define all(a) (a).begin(),(a).end() using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); int Y, M, D; cin >> Y >> M >> D; if (Y < 1989 || Y > 2019) { cout << "No" << endl; } else if (Y == 1989) { if (M < 1) { cout << "No" << endl; } else if (M == 1 && D < 8) { cout << "No" << endl; } else cout << "Yes" << endl; } else if (Y == 2019) { if (M > 4) { cout << "No" << endl; } else cout << "Yes" << endl; } else { cout << "Yes" << endl; } return 0; }