#include "bits/stdc++.h" using namespace std; #define int long long #define endl '\n' int mod=1e9+7; signed main(){ int y,m,d; cin>>y>>m>>d; bool f=true; if(y==1989&&m==1&&d<8)f=false; if(y<1989)f=false; if(y==2019&&m==4&&d>30)f=false; if(y==2019&&m>4)f=false; if(y>2019)f=false; if(f)cout<<"Yes"<