#include #include #include int main() { char buf[32768]; scanf("%s", buf); std::string p = buf; if (p.length() == 1) return puts("No"), 0; while (p.length() > 2) { int b = p.back() - '0'; if (!(2 <= b && b <= 4)) break; p.pop_back(); --p.back(); } if (p == "12" || p == "13" || p == "14") return puts("Yes"), 0; fprintf(stderr, "> %s\n", p.c_str()); for (int ch: p) if (!(ch == '6' || ch == '7')) return puts("No"), 0; puts("Yes"); }