#include #define int long long using namespace std; const int MOD = 1000000007; signed main() { int Y, M, D; cin >> Y >> M >> D; bool fg = true; if( Y < 1989 || 2019 < Y ) fg = false; if( Y == 1989 && M == 1 && D < 8 ) fg = false; if( Y == 2019 && M > 4 ) fg = false; if( fg ) cout << "Yes" << endl; else cout << "No" << endl; }