#include #include #include #include #include using namespace std; //split(string,区切り文字) vector split(const string& i, char del) { istringstream stream(i); string field; vector result; while (getline(stream, field, del)) { result.push_back(field); } return result; } int sp(const string&i, int num){ int a = stoi(split(i,'.')[num]); return a; } int main(){ string m,n; cin >> m >> n; if (sp(m, 0) > sp(n, 0)) { cout << "YES" << "\n"; }else if (sp(m, 0) < sp(n, 0)) { cout << "NO" << "\n"; }else{ if (sp(m, 1) > sp(n, 1)) { cout << "YES" << "\n"; }else if (sp(m, 1) < sp(n, 1)) { cout << "NO" << "\n"; }else{ if (sp(m, 2) >= sp(n, 2)) { cout << "YES" << "\n"; }else if (sp(m, 2) < sp(n, 2)) { cout << "NO" << "\n"; } } } return 0; }