#include "bits/stdc++.h" using namespace std; #define ll long long int int main() { cin.tie(0); ios::sync_with_stdio(false); int y,m,d; ll a; cin >> y >> m >> d; a=(ll)y*10000+m*100+d; if (a>=19890108&&a<=20190430) cout << "Yes" << endl; else cout << "No" << endl; return 0; }