#include <bits/stdc++.h>
#pragma GCC omptimize("unroll-loops")
#pragma GCC omptimize("KEK")
#pragma GCC optimize("no-stack-protector")
#pragma comment(linker, "/STACK:1000000000")
using namespace std;
const int INF32 = 2009000999;
const long long INF64 = 4e18;
const int sz = (1 << 20);
const int mod = 1e9 + 7;
pair<int, int> w[2];
int f(pair<int, int> b[]) {
  if (b[0].first <= w[0].first && b[0].second <= w[0].second &&
      b[1].first >= w[1].first && b[1].second >= w[1].second)
    return 0;
  if (b[1].first >= w[1].first && b[1].second >= w[1].second &&
      b[0].second <= w[0].second) {
    w[1].first = min(w[1].first, b[0].first);
    return 1;
  }
  if (b[1].first >= w[1].first && b[1].second >= w[1].second &&
      b[0].first <= w[0].first) {
    w[1].second = min(w[1].second, b[0].second);
    return 1;
  }
  if (b[0].first <= w[0].first && b[0].second <= w[0].second &&
      b[1].second >= w[1].second) {
    w[0].first = max(w[0].first, b[1].first);
    return 1;
  }
  if (b[0].first <= w[0].first && b[0].second <= w[0].second &&
      b[1].first >= w[1].first) {
    w[0].second = max(b[1].second, w[0].second);
    return 1;
  }
  return 1;
}
void Solve() {
  pair<int, int> b[2];
  pair<int, int> b1[2];
  for (int i = 0; i <= 1; i++) cin >> w[i].first >> w[i].second;
  for (int i = 0; i <= 1; i++) cin >> b[i].first >> b[i].second;
  for (int i = 0; i <= 1; i++) cin >> b1[i].first >> b1[i].second;
  if (f(b) && f(b1))
    cout << "YES\n";
  else
    cout << "NO\n";
}
signed main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int q = 1;
  while (q--) Solve();
}
