#include #include #include #include #include #include #include #include using namespace std; int versionCheck(vector list0, vectorlist1){ bool flag = false; if (list0[0] > list1[0]) { //古い flag = true; return flag; } if (list0[0] == list1[0]) { if (list0[1] > list1[1]) { //古い flag = true; return flag; } if (list0[1] == list1[1]) { if (list0[2] >= list1[2]) { //古い flag = true; return flag; } } } return flag; } int main() { int a0, b0, c0; int a1, b1, c1; scanf("%d.%d.%d", &a0, &b0, &c0); scanf("%d.%d.%d", &a1, &b1, &c1); vectorlist0; vectorlist1; list0.push_back(a0); list0.push_back(b0); list0.push_back(c0); list1.push_back(a1); list1.push_back(b1); list1.push_back(c1); if (versionCheck(list0, list1)) cout << "YES" << endl; else cout << "NO" << endl; return 0; }