#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define lint long long int /* vectoral(26); al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; vectorAL(26); AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; */ int main() { int Y, M, D; cin >> Y >> M >> D; if (Y == 1989 && M == 1) { if (D < 8) { cout << "No" << endl; } else { cout << "Yes" << endl; } } else if (1990 <= Y && Y <= 2018) { cout << "Yes" << endl; } else if (Y == 2019) { if (M < 4) { cout << "Yes" << endl; } else if (M == 4) { if (D <= 30) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else { cout << "No" << endl; } } }