#include <bits/stdc++.h>
using namespace std;
long long white;
vector<int> x(7), y(7);
long long solve1(int a, int b, int c, int d, int e, int f, int g, int h) {
  int l, r, x, y;
  l = max(a, e);
  r = min(c, g);
  y = max(f, b);
  x = min(d, h);
  if (r - l > 0 && x - y > 0) {
    return 1LL * (r - l) * (x - y);
  }
  return 0;
}
long long solve2(int a, int b, int c, int d, int e, int f, int g, int h, int p,
                 int q, int s, int t) {
  int l, r, x, y;
  l = max(a, e);
  r = min(c, g);
  y = max(f, b);
  x = min(d, h);
  return solve1(p, q, s, t, l, y, r, x);
}
int main(void) {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 1; i <= 6; ++i) {
    cin >> x[i] >> y[i];
  }
  white = 1LL * (x[2] - x[1]) * (y[2] - y[1]) -
          solve1(x[1], y[1], x[2], y[2], x[3], y[3], x[4], y[4]) -
          solve1(x[1], y[1], x[2], y[2], x[5], y[5], x[6], y[6]) +
          solve2(x[3], y[3], x[4], y[4], x[5], y[5], x[6], y[6], x[1], y[1],
                 x[2], y[2]);
  cout << (white > 0 ? "YES" : "NO") << "\n";
  return 0;
}
