#include <bits/stdc++.h>
using namespace std;
bool ok(long long x, long long y, long long x1, long long y1, long long x2,
        long long y2) {
  return x < x1 || x > x2 || y < y1 || y > y2;
}
void solve() {
  long long x1, x2, x3, x4, x5, x6;
  long long y1, y2, y3, y4, y5, y6;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5 >> x6 >> y6;
  x1 *= 2;
  y1 *= 2;
  x2 *= 2;
  y2 *= 2;
  x3 *= 2;
  y3 *= 2;
  x4 *= 2;
  y4 *= 2;
  x5 *= 2;
  y5 *= 2;
  x6 *= 2;
  y6 *= 2;
  bool ans = false;
  for (long long x = x1; x <= x2; x++) {
    if (ok(x, y1, x3, y3, x4, y4) && ok(x, y1, x5, y5, x6, y6)) {
      cout << "YES\n";
      return;
    }
    if (ok(x, y2, x3, y3, x4, y4) && ok(x, y2, x5, y5, x6, y6)) {
      cout << "YES\n";
      return;
    }
  }
  for (long long y = y1; y <= y2; y++) {
    if (ok(x1, y, x3, y3, x4, y4) && ok(x1, y, x5, y5, x6, y6)) {
      cout << "YES\n";
      return;
    }
    if (ok(x2, y, x3, y3, x4, y4) && ok(x2, y, x5, y5, x6, y6)) {
      cout << "YES\n";
      return;
    }
  }
  cout << "NO\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout.precision(30);
  long long t = 1;
  while (t--) solve();
}
