//inlclude前用define #define _USE_MATH_DEFINES //include #include #include #include #include #include using namespace std; //typedef typedef vector VI; typedef vector VS; typedef vector VC; int main() { VI a(2), b(2), c(2); VC ac(2), bc(2); cin >> a[0] >> ac[0] >> b[0] >> bc[0] >> c[0] ; cin >> a[1] >> ac[1] >> b[1] >> bc[1] >> c[1] ; bool flag = false; if (a[0] > a[1]) { cout << "YES" << endl; }else if (a[0] == a[1]) { if (b[0] > b[1]) { cout << "YES" << endl; }else if (b[0] == b[1]) { if (c[0] > c[1]) { cout << "YES" << endl; } else { cout << "NO" << endl; } }else { cout << "NO" << endl; } }else { cout << "NO" << endl; } return 0; }