#include <bits/stdc++.h>
using namespace std;
struct node {
  long long a, b, c, d;
};
int main(int argc, char const *argv[]) {
  long long x[7], y[7];
  cin >> x[1] >> y[1];
  cin >> x[2] >> y[2];
  cin >> x[3] >> y[3];
  cin >> x[4] >> y[4];
  cin >> x[5] >> y[5];
  cin >> x[6] >> y[6];
  vector<struct node> arr;
  struct node n;
  n.a = x[1];
  n.b = y[1];
  n.c = x[2];
  n.d = y[2];
  arr.push_back(n);
  long long p, q, r, s;
  p = x[3];
  q = y[3];
  r = x[4];
  s = y[4];
  for (long long i = 0; i < 1; i++) {
    struct node n;
    n.a = arr[i].a;
    n.b = arr[i].b;
    n.c = min(max(arr[i].a, p), arr[i].c);
    n.d = min(max(arr[i].b, s), arr[i].d);
    arr.push_back(n);
    struct node n1;
    n1.a = arr[i].a;
    n1.b = min(max(arr[i].b, s), arr[i].d);
    n1.c = arr[i].c;
    n1.d = arr[i].d;
    arr.push_back(n1);
    struct node n2;
    n2.a = min(max(p, arr[i].a), arr[i].c);
    n2.b = arr[i].b;
    n2.c = arr[i].c;
    n2.d = min(max(q, arr[i].b), arr[i].d);
    arr.push_back(n2);
    struct node n3;
    n3.a = min(max(r, arr[i].a), arr[i].c);
    n3.b = min(max(q, arr[i].b), arr[i].d);
    n3.c = arr[i].c;
    n3.d = min(max(s, arr[i].b), arr[i].d);
    arr.push_back(n3);
  }
  p = x[5];
  q = y[5];
  r = x[6];
  s = y[6];
  for (long long i = 1; i <= 4; i++) {
    struct node n;
    n.a = arr[i].a;
    n.b = arr[i].b;
    n.c = min(max(arr[i].a, p), arr[i].c);
    n.d = min(max(arr[i].b, s), arr[i].d);
    arr.push_back(n);
    struct node n1;
    n1.a = arr[i].a;
    n1.b = min(max(arr[i].b, s), arr[i].d);
    n1.c = arr[i].c;
    n1.d = arr[i].d;
    arr.push_back(n1);
    struct node n2;
    n2.a = min(max(p, arr[i].a), arr[i].c);
    n2.b = arr[i].b;
    n2.c = arr[i].c;
    n2.d = min(max(q, arr[i].b), arr[i].d);
    arr.push_back(n2);
    struct node n3;
    n3.a = min(max(r, arr[i].a), arr[i].c);
    n3.b = min(max(q, arr[i].b), arr[i].d);
    n3.c = arr[i].c;
    n3.d = min(max(s, arr[i].b), arr[i].d);
    arr.push_back(n3);
  }
  long long area = 0;
  for (long long i = 5; i < arr.size(); i++) {
    area += (arr[i].d - arr[i].b) * (arr[i].c - arr[i].a);
  }
  if (area != 0) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
