#include using namespace std; using int64 = long long; int main() { int Y, M, D; cin >> Y >> M >> D; int t = Y * 10000 + M * 100 + D; if(1989 * 10000 + 4 * 100 + 8 <= t && t <= 2019 * 10000 + 4 * 100 + 30) { cout << "Yes\n"; } else { cout << "No\n"; } }