#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double pi = 2 * acos(0.0);
const double eps = 1e-9;
template <class T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
long long data[200005];
int main() {
  ios_base::sync_with_stdio(0);
  long long x1, y1, x2, y2;
  long long x3, y3, x4, y4;
  long long x5, y5, x6, y6;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5 >> x6 >> y6;
  long long p1, q1, p2, q2;
  bool b1 = true;
  if (x4 < x1 || x3 > x2 || y3 > y2 || y4 < y1)
    b1 = false;
  else {
    if (x3 >= x1 && x3 <= x2)
      p1 = x3;
    else
      p1 = x1;
    if (y3 >= y1 && y3 <= y2)
      q1 = y3;
    else
      q1 = y1;
    if (x4 >= x1 && x4 <= x2)
      p2 = x4;
    else
      p2 = x2;
    if (y4 >= y1 && y4 <= y2)
      q2 = y4;
    else
      q2 = y2;
  }
  long long p3, q3, p4, q4;
  bool b2 = true;
  if (x6 < x1 || x5 > x2 || y5 > y2 || y6 < y1)
    b2 = false;
  else {
    if (x5 >= x1 && x5 <= x2)
      p3 = x5;
    else
      p3 = x1;
    if (y5 >= y1 && y5 <= y2)
      q3 = y5;
    else
      q3 = y1;
    if (x6 >= x1 && x6 <= x2)
      p4 = x6;
    else
      p4 = x2;
    if (y6 >= y1 && y6 <= y2)
      q4 = y6;
    else
      q4 = y2;
  }
  if (b1 && b2) {
    long long m1, n1, m2, n2;
    if (p4 < p1 || p3 > p2 || q3 > q2 || q4 < q1) {
      cout << "YES" << '\n';
    } else {
      if (p3 >= p1 && p3 <= p2)
        m1 = p3;
      else
        m1 = p1;
      if (q3 >= q1 && q3 <= q2)
        n1 = q3;
      else
        n1 = q1;
      if (p4 >= p1 && p4 <= p2)
        m2 = p4;
      else
        m2 = p2;
      if (q4 >= q1 && q4 <= q2)
        n2 = q4;
      else
        n2 = q2;
      long long total = abs(x2 - x1) * abs(y2 - y1);
      long long sum = abs(p2 - p1) * abs(q2 - q1) +
                      abs(p4 - p3) * abs(q4 - q3) - abs(m2 - m1) * abs(n2 - n1);
      if (total == sum)
        cout << "NO" << '\n';
      else
        cout << "YES" << '\n';
    }
  } else {
    if (b1 && p1 == x1 && p2 == x2 && q1 == y1 && q2 == y2)
      cout << "NO" << '\n';
    else if (b2 && p3 == x1 && p4 == x2 && q3 == y1 && q4 == y2)
      cout << "NO" << '\n';
    else
      cout << "YES" << '\n';
  }
}
