#include <iostream> #include <string> using namespace std; int main() { string id; while (cin >> id) { bool flag = false; id += '.'; for (int i = 0, j = 0, k = 0, n = id.size(); j < n; ++j) { if (id[j] != '.') continue; else { int val = stoi(id.substr(i, j - i)); if (0 > val || 255 < val) break; i = j + 1; if (++k == 4) flag = true; } } cout << (flag ? "Yes!" : "No!") << endl; } } // 64 位输出请用 printf("%lld")