#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
const int mod = 1e9 + 7;
const int B = 317;
pair<int, int> p[7];
bool foo(int x, int y) {
  if (p[3].first <= x && x <= p[4].first && p[3].second <= y &&
      y <= p[4].second)
    return false;
  if (p[5].first <= x && x <= p[6].first && p[5].second <= y &&
      y <= p[6].second)
    return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  for (int i = 1; i <= 6; i++) {
    cin >> p[i].first >> p[i].second;
    p[i].first *= 2;
    p[i].second *= 2;
  }
  for (int i = p[1].first; i <= p[2].first; i++) {
    if (foo(i, p[1].second) || foo(i, p[2].second)) {
      cout << "YES";
      return 0;
    }
  }
  for (int i = p[1].second; i <= p[2].second; i++) {
    if (foo(p[1].first, i) || foo(p[2].first, i)) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
}
