#include<cstdio> #include<string> #include<iostream> using namespace std; int main() { string str; getline(cin, str); int flag = 1; string result; for (int i = 0; i < str.size(); i++) { if (str[i] == '.' ) { if (stoi(result) > 255 || stoi(result) < 0) { flag = 0; break; } else { result = ""; } } else { result += str[i]; } } if (stoi(result) > 255 || stoi(result) < 0) flag = 0; if (flag == 1) printf("Yes!"); else printf("No!"); }