#include using namespace std; int main() { int A[2], B[2], C[2]; for (int i = 0; i < 2; i++) { cin >> A[i] >> B[i] >> C[i]; } if (A[0] > A[1] && B[0] > B[1] && C[0] > C[1]) { cout << "YES" << endl; } if (A[0] <= A[1] && B[0] <= B[1] && C[0] <= C[1]) { cout << "NO" << endl; } return 0; }