#include using namespace std; int main(){ int y,m,d; cin >> y >> m >> d; if(y <= 1988){ cout << "No" << endl; } else { if(y == 1989){ if(m == 1){ if(d <= 7){ cout << "No" << endl; } else { cout << "Yes" << endl; } } } else { if(2020 <= y){ cout << "No" << endl; } else if(y == 2019){ if(m <= 4){ cout << "Yes" << endl; } else { cout << "No" << endl; } } else { cout << "Yes" << endl; } } } return 0; }