#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; vector split(string s, const string &delimiter) { size_t pos_start = 0, pos_end, delim_len = delimiter.length(); string token; vector res; while ((pos_end = s.find(delimiter, pos_start)) != string::npos) { token = s.substr(pos_start, pos_end - pos_start); pos_start = pos_end + delim_len; res.push_back(token); } res.push_back(s.substr(pos_start)); return res; } int main() { string s1, s2; cin >> s1 >> s2; vector ss1 = split(s1, "."); vector ss2 = split(s2, "."); string result = "NO"; for (int i = 0; i < 3; ++i) { if (stoi(ss1[i]) >= stoi(ss2[i])) { result = "YES"; break; } else { break; } } cout << result << endl; return 0; }