#include using namespace std; typedef long long ll; int main(){ int y, m, d; cin >> y >> m >> d; string ans = "No"; if (1989 <= y && y <= 2019){ ans = "Yes"; if (y == 1989 && m == 1 && d < 8) ans = "No"; else if (y == 2019 && m > 4) ans = "No"; } cout << ans << endl; return 0; }