#include "bits/stdc++.h" using namespace std; int main() { int Y, M, D, X; cin >> Y >> M >> D; X = Y * 10000 + M * 100 + D; if (19890108 <= X && X <= 20190430) cout << "Yes"; else cout << "No"; }