#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 9;
int t, id, n, m, x, y, k, c, xx, yy;
long long res, tot, sum;
char ch;
char s[N], z[N];
struct rect {
  int minX, minY, maxX, maxY;
} a[5];
vector<rect> v;
void work(rect W, rect B) {
  int minX_new, minY_new, maxX_new, maxY_new;
  minX_new = max(W.minX, B.minX);
  maxX_new = min(W.maxX, B.maxX);
  minY_new = max(W.minY, B.minY);
  maxY_new = min(W.maxY, B.maxY);
  if (minX_new >= maxX_new || minY_new >= maxY_new) {
    v.push_back(W);
    return;
  }
  if (minX_new > W.minX) {
    v.push_back({W.minX, W.minY, minX_new, W.maxY});
  }
  if (maxX_new < W.maxX) {
    v.push_back({maxX_new, W.minY, W.maxX, W.maxY});
  }
  if (minY_new > W.minY) {
    v.push_back({minX_new, W.minY, maxX_new, minY_new});
  }
  if (maxY_new < W.maxY) {
    v.push_back({minX_new, maxY_new, maxX_new, W.maxY});
  }
}
int main() {
  for (int i = 0; i < (int)3; ++i) {
    scanf("%d%d", &a[i].minX, &a[i].minY);
    scanf("%d%d", &a[i].maxX, &a[i].maxY);
  }
  v.push_back(a[0]);
  int k = 0;
  for (int i = 1; i <= (int)2; ++i) {
    int m = v.size();
    while (k < m) {
      work(v[k], a[i]);
      ++k;
    }
  }
  if (v.size() > k)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
