#include #define rep(i, n) for (ll i = 0; i < n; ++i) typedef long long ll; using namespace std; const int INF = 1e9; int main() { int y, m, d; cin >> y >> m >> d; bool ans = false; if (y > 1989 && y < 2019) ans = true; else if (y == 1989) { if (m != 1 || d >= 8) ans = true; } else if (y == 2019) { if (m <= 4) ans = true; } ans ? cout << "Yes" : cout << "No"; cout << endl; return 0; }