#include int main() { int Y; int M; int D; bool FlagA = false; bool FlagB = false; bool FlagC = false; while (FlagA == false) { std::cout << "a" << std::endl; std::cin >> Y; if (Y >= 1969 && Y <= 2038)FlagA = true; } while (FlagB == false) { std::cout << "b" << std::endl; std::cin >> M; if (M >= 1 && M <= 12) { if (Y == 1969 && M == 12)FlagB = true; else if (Y == 2038 && M <= 4)FlagB = true; else if (Y >= 1970 && Y <= 2037)FlagB = true; } } while (FlagC == false) { std::cout << "c" << std::endl; std::cin >> D; switch (M) { case 1: if (D >= 1 && D <= 31)FlagC = true; break; case 2: if (D >= 1 && D <= 27)FlagC = true; break; case 3: if (D >= 1 && D <= 31)FlagC = true; break; case 4: if (D >= 1 && D <= 30)FlagC = true; break; case 5: if (D >= 1 && D <= 31)FlagC = true; break; case 6: if (D >= 1 && D <= 30)FlagC = true; break; case 7: if (D >= 1 && D <= 31)FlagC = true; break; case 8: if (D >= 1 && D <= 31)FlagC = true; break; case 9: if (D >= 1 && D <= 30)FlagC = true; break; case 10: if (D >= 1 && D <= 31)FlagC = true; break; case 11: if (D >= 1 && D <= 30)FlagC = true; break; case 12: if (D >= 1 && D <= 31)FlagC = true; break; } } bool hantei; if (Y >= 1989 && Y <= 2019) { if (Y == 1989 && M == 1 && M >= 8)hantei = true; if (Y == 2019 && M <= 4)hantei = true; if (Y >= 1990 && Y <= 2018)hantei = true; } else hantei = false; if (hantei == true)std::cout << "Yes" << std::endl; if (hantei == false)std::cout << "No" << std::endl; return 0; }