#include <bits/stdc++.h>
using namespace std;
bool check(vector<int>& b, vector<int>& w) {
  return b[0] <= w[0] && b[1] <= w[1] && b[2] >= w[2] && b[3] >= w[3];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<int> w(4), b1(4), b2(4);
  for (int i = 0; i < 4; i++) cin >> w[i];
  for (int i = 0; i < 4; i++) cin >> b1[i];
  for (int i = 0; i < 4; i++) cin >> b2[i];
  if (check(b1, w) || check(b2, w))
    cout << "NO" << endl;
  else if (max(b1[0], b2[0]) <= min(b1[2], b2[2]) &&
           max(b1[1], b2[1]) <= min(b1[3], b2[3])) {
    vector<int> b3 = {min(b1[0], b2[0]), max(b1[1], b2[1]), max(b1[2], b2[2]),
                      min(b1[3], b2[3])};
    vector<int> b4 = {max(b1[0], b2[0]), min(b1[1], b2[1]), min(b1[2], b2[2]),
                      max(b1[3], b2[3])};
    if (check(b3, w) || check(b4, w))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  } else
    cout << "YES" << endl;
  return 0;
}
