#include using namespace std; #define int long long #define rep(i,l,r) for(int i=(int)(l);i<(int)(r);i++) #define all(x) (x).begin(),(x).end() #define sz(x) ((int)x.size()) templatebool chmax(T &a,T b){if(abool chmin(T &a,T b){if(a>b){a=b;return 1;}return 0;} typedef pair pii; typedef vector vi; typedef vector vvi; const int inf = 1LL<<60; const int mod = 1e9 + 7; const double eps = 1e-9; /*{ }*/ signed main(){ int y, m, d; cin >> y >> m >> d; cout << ([&](){ if(1989 < y and y < 2019) return true; if(y == 1989){ if(1 < m) return true; else if(m == 1 and 8 <= d) return true; } if(y == 2019){ if(m < 4) return true; else if(m == 4 and d <= 30) return true; } return false; }() ? "Yes" : "No") << endl; return 0; }