#include //cin, cout #include //vector #include //sort,min,max #include //string #include //fixed #include //setprecision #include //swap #include //abs(int) #include //sqrt #include //stringstream,getline using namespace std; inline std::vector Split_String(const std::string& str, const char key) { std::vector result; std::stringstream SS(str); std::string temp; while (std::getline(SS, temp, key)) { result.push_back(temp); } return(result); } int main() { vector A, B; string temp; cin >> temp; A = Split_String(temp, '.'); cin >> temp; B = Split_String(temp, '.'); if (stoi(B[0]) <= stoi(A[0])) { if (stoi(B[1]) <= stoi(A[1])) { if (stoi(B[2]) <= stoi(A[2])) { cout << "YES" << endl; return 0; } } } cout << "NO" << endl; return 0; }