#include #include using namespace std; int main() { int y, m, d; cin >> y >> m >> d; if (1989 <= y && y >= 2019) { if (y == 1989) { if ((m == 1) && (d >= 8)) { cout << "YES" << endl; return 0; } if (m != 1) { cout << "YES" << endl; return 0; } cout << "NO" << endl; return 0; } if (y == 2019) { if ((m == 4) && (m <= 30)) { cout << "YES" << endl; return 0; } if (m < 4) { cout << "YES" << endl; return 0; } cout << "NO" << endl; return 0; } if ((y != 2020) && (y != 1989)) { cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }