#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; int main() { int a1, b1, c1; int a2, b2, c2; scanf("%d.%d.%d", &a1, &b1, &c1); scanf("%d.%d.%d", &a2, &b2, &c2); if (a2 <= a1) { if (b2 <= b1) { if (c2 <= c1) { cout << "YES" << endl; return 0; } } } cout << "NO" << endl; return 0; }