#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int y, m, d; cin >> y >> m >> d; if (1989 < y && y < 2019) { cout << "Yes" << endl; } else if (y == 1989 && (m > 1 || d >= 8)) { cout << "Yes" << endl; } else if (y == 2019 && (m < 4 || (m == 4 && d <= 30))) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }