#include #include using namespace std; int main() { int a[6] = {}, i, z, f = 0, t = 0; string n[2], sd; char k = '.'; cin >> n[0] >> n[1]; for (z = 0; z < 2; z++) { for (i = 0; i < n[z].length(); i++) { if (n[z][i] == k) { a[t] = stoi(sd); t += 1; sd = ""; } else { sd += n[z][i]; } } a[t] = stoi(sd); t += 1; sd = ""; } if (a[0] < a[3]) { cout << "NO" << endl; f = 1; } else if (a[0] == a[3]) { if (a[1] < a[4]) { cout << "NO" << endl; f = 1; } else if (a[1] == a[4]) { if (a[2] < a[5]) { cout << "NO" << endl; f = 1; } } } if (f == 0) {cout << "YES" << endl;} return 0; }