#include <bits/stdc++.h>
using namespace std;
struct rect {
  long double x1, x2, y1, y2;
};
rect r, r2, r3;
bool check(long double x, long double y) {
  if (r2.x1 <= x and x <= r2.x2 and r2.y1 <= y and y <= r2.y2) return false;
  if (r3.x1 <= x and x <= r3.x2 and r3.y1 <= y and y <= r3.y2) return false;
  return true;
}
void solve() {
  cin >> r.x1 >> r.y1 >> r.x2 >> r.y2;
  cin >> r2.x1 >> r2.y1 >> r2.x2 >> r2.y2;
  cin >> r3.x1 >> r3.y1 >> r3.x2 >> r3.y2;
  for (long double i = r.x1; i <= r.x2; i += 0.5)
    if (check(i, r.y1) or check(i, r.y2)) {
      cout << "YES";
      return;
    }
  for (long double i = r.y1; i <= r.y2; i += 0.5)
    if (check(r.x1, i) or check(r.x2, i)) {
      cout << "YES";
      return;
    }
  cout << "NO";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long TESTS = 1;
  while (TESTS--) {
    solve();
  }
  return 0;
}
