#include using namespace std; int main() { int A,B,C; cin>>A>>B>>C; cout<<(19890108<=A*10000+B*100+C&&A*10000+B*100+C<=20190430?"Yes":"No")<