#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long wsh[4];
  long long bsht1[4];
  long long bsht2[4];
  long long maxminx1[4];
  long long maxminy1[4];
  long long maxminx2[4];
  long long maxminy2[4];
  for (long long i = 0; i < 4; i++) {
    cin >> wsh[i];
  }
  maxminx1[0] = wsh[0];
  maxminx1[1] = wsh[2];
  maxminy1[0] = wsh[1];
  maxminy1[1] = wsh[3];
  maxminx2[0] = wsh[0];
  maxminx2[1] = wsh[2];
  maxminy2[0] = wsh[1];
  maxminy2[1] = wsh[3];
  for (long long i = 0; i < 4; i++) {
    cin >> bsht1[i];
  }
  maxminx1[2] = bsht1[0];
  maxminx1[3] = bsht1[2];
  maxminy1[2] = bsht1[1];
  maxminy1[3] = bsht1[3];
  for (long long i = 0; i < 4; i++) {
    cin >> bsht2[i];
  }
  maxminx2[2] = bsht2[0];
  maxminx2[3] = bsht2[2];
  maxminy2[2] = bsht2[1];
  maxminy2[3] = bsht2[3];
  long long maxminful[3];
  maxminful[0] = wsh[0];
  maxminful[1] = bsht1[0];
  maxminful[2] = bsht2[0];
  long long shper, fullsh, sh, swsh, fullsper, sper1;
  swsh = (wsh[2] - wsh[0]) * (wsh[3] - wsh[1]);
  if (wsh[2] < bsht1[0] || bsht1[2] < wsh[0]) {
    shper = 0;
  } else {
    fullsh = wsh[2] - wsh[0] + bsht1[2] - bsht1[0];
    sh = *max_element(maxminx1, maxminx1 + 4) -
         *min_element(maxminx1, maxminx1 + 4);
    shper = fullsh - sh;
  }
  long long fulldl, dlper, dl;
  if (wsh[3] < bsht1[1] || bsht1[3] < wsh[1]) {
    dlper = 0;
  } else {
    fulldl = wsh[3] - wsh[1] + bsht1[3] - bsht1[1];
    dl = *max_element(maxminy1, maxminy1 + 4) -
         *min_element(maxminy1, maxminy1 + 4);
    dlper = fulldl - dl;
  }
  sper1 = shper * dlper;
  if (sper1 == swsh) {
    cout << "NO";
  } else {
    long long shper2, fullsh2, sh2, sper2;
    if (wsh[2] < bsht2[0] || bsht2[2] < wsh[0]) {
      shper2 = 0;
    } else {
      fullsh2 = wsh[2] - wsh[0] + bsht2[2] - bsht2[0];
      sh2 = *max_element(maxminx2, maxminx2 + 4) -
            *min_element(maxminx2, maxminx2 + 4);
      shper2 = fullsh2 - sh2;
    }
    long long fulldl2, dlper2, dl2;
    if (wsh[3] < bsht2[1] || bsht2[3] < wsh[1]) {
      dlper2 = 0;
    } else {
      fulldl2 = wsh[3] - wsh[1] + bsht2[3] - bsht2[1];
      dl2 = *max_element(maxminy2, maxminy2 + 4) -
            *min_element(maxminy2, maxminy2 + 4);
      dlper2 = fulldl2 - dl2;
    }
    sper2 = shper2 * dlper2;
    if (sper2 == swsh) {
      cout << "NO";
    } else if ((sper1 < swsh && sper2 == 0) || (sper1 == 0 && sper2 < swsh)) {
      cout << "YES";
    } else {
      fullsper = sper1 + sper2;
      if ((bsht1[2] <= bsht2[0] || bsht2[2] <= bsht1[0]) ||
          (bsht1[3] <= bsht2[1] || bsht2[3] <= bsht1[1])) {
        if (fullsper < swsh) {
          cout << "YES";
        } else if (fullsper == swsh) {
          cout << "NO";
        }
      } else {
        long long shper3, dlper3, sper3;
        if ((bsht1[2] < wsh[0] && bsht2[2] < wsh[0]) ||
            (wsh[2] < bsht2[0] && wsh[2] < bsht1[0])) {
          shper3 = 0;
          sper3 = 0;
          fullsper = fullsper - sper3;
        } else {
          long long a, b, c, d;
          a = *max_element(maxminful, maxminful + 3);
          maxminful[0] = wsh[2];
          maxminful[1] = bsht1[2];
          maxminful[2] = bsht2[2];
          b = *min_element(maxminful, maxminful + 3);
          shper3 = b - a;
          maxminful[0] = wsh[1];
          maxminful[1] = bsht1[1];
          maxminful[2] = bsht2[1];
          c = *max_element(maxminful, maxminful + 3);
          maxminful[0] = wsh[3];
          maxminful[1] = bsht1[3];
          maxminful[2] = bsht2[3];
          d = *min_element(maxminful, maxminful + 3);
          dlper3 = d - c;
          sper3 = dlper3 * shper3;
          fullsper = fullsper - sper3;
        }
        if (fullsper < swsh) {
          cout << "YES";
        } else if (fullsper == swsh) {
          cout << "NO";
        }
      }
    }
  }
}
