#include <bits/stdc++.h>
using namespace std;
int x[6], y[6];
bool secondFullCover() {
  if (x[4] <= x[0] && y[4] <= y[0]) {
    if (x[1] <= x[5] && y[1] <= y[5]) {
      return true;
    }
  }
  return false;
}
int main(void) {
  for (int i = 0; i < 6; i++) {
    cin >> x[i] >> y[i];
  }
  if (x[2] <= x[0] && y[2] <= y[0]) {
    if (x[1] <= x[3] && y[0] < y[3] && y[3] < y[1]) {
      y[0] = y[3];
    } else if (x[1] <= x[3] && y[1] <= y[3]) {
      cout << "NO" << endl;
      return 0;
    } else if (x[0] < x[3] && x[3] < x[1] && y[1] <= y[3]) {
      x[0] = x[3];
    }
  }
  if (x[0] < x[2] && x[2] < x[1] && y[2] <= y[0]) {
    if (x[1] <= x[3] && y[1] <= y[3]) {
      x[1] = x[2];
    }
  }
  if (x[2] <= x[0] && y[0] < y[2] && y[2] < y[1]) {
    if (x[1] <= x[3] && y[1] <= y[3]) {
      y[1] = y[2];
    }
  }
  if (secondFullCover() == true) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
}
