#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #define INF 1050000000 #define SIZE 300 #define MOD 1000000007 using namespace std; int main() { char s1[100], s2[100]; int a, b, c; int x, y; int i = 0; cin >> s1 >> s2; while (s1[i] != '\0') { if (s1[i] == '.') s1[i] = ' '; i++; } i = 0; while (s2[i] != '\0') { if (s2[i] == '.') s2[i] = ' '; i++; } sscanf(s1, "%d%d%d", &a, &b, &c); x = a * 100 + b * 10 + c; sscanf(s2, "%d%d%d", &a, &b, &c); y = a * 100 + b * 10 + c; if (x >= y) cout << "YES" << endl; else cout << "NO" << endl; return (0); }