#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,sse,sse2")
using namespace std;
const double pi = 3.141592653589793238460;
template <typename T, typename T1>
T ama(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amm(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long N = 3e6 + 5;
long long a[N], b[N];
long long x1, x2, y2, x3, x4, x5, x6, y3, y4, y5, y6;
long long ck(long long x, long long y) {
  if (x < x3 || x > x4 || y < y3 || y > y4) return 1;
  return 0;
}
long long ck1(long long x, long long y) {
  if (x < x5 || x > x6 || y < y5 || y > y6) return 1;
  return 0;
}
void fun() {
  long long y1;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5 >> x6 >> y6;
  long long fg = 0;
  for (int i = (x1); i <= (x2 - 1); i++) {
    a[i] = 1;
  }
  for (int i = (x3); i <= (x4 - 1); i++) a[i] = 0;
  for (int i = (x5); i <= (x6 - 1); i++) a[i] = 0;
  for (int i = (x1); i <= (x2); i++) {
    if (a[i] == 1) {
      fg = 1;
      break;
    }
  }
  if (fg) {
    cout << "YES" << '\n';
    return;
  }
  for (int i = (y1); i <= (y2 - 1); i++) {
    b[i] = 1;
  }
  for (int i = (y3); i <= (y4 - 1); i++) b[i] = 0;
  for (int i = (y5); i <= (y6 - 1); i++) b[i] = 0;
  for (int i = (y1); i <= (y2); i++) {
    if (b[i] == 1) {
      fg = 1;
      break;
    }
  }
  if (fg) {
    cout << "YES" << '\n';
    return;
  }
  long long ax = x1, ay = y1, bx = x2, by = y1;
  long long cx = x2, cy = y2, dx = x1, dy = y2;
  if (ck(ax, ay) && ck1(ax, ay)) {
    fg = 1;
  }
  if (ck(bx, by) && ck1(bx, by)) {
    fg = 1;
  }
  if (ck(cx, cy) && ck1(cx, cy)) {
    fg = 1;
  }
  if (ck(dx, dy) && ck1(dx, dy)) {
    fg = 1;
  }
  if (fg) {
    cout << "YES" << '\n';
    return;
  }
  cout << "NO" << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    fun();
  }
  return 0;
}
