#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
void solve() {
  long long x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5 >> x6 >> y6;
  if (x5 < x3) {
    swap(x3, x5);
    swap(y3, y5);
    swap(x4, x6);
    swap(y4, y6);
  }
  bool first[x2 + 1], second[y2 + 1];
  for (long long i = 0; i < x1; i++) first[i] = false;
  for (long long i = x1; i < x2 + 1; i++) first[i] = true;
  for (long long i = 0; i < y1; i++) second[i] = false;
  for (long long i = y1; i < y2 + 1; i++) second[i] = true;
  for (long long i = x3; i < x4 + 1; i++) {
    if (i >= x1 && i <= x2 && y4 >= y2 && y3 <= y1) first[i] = false;
  }
  for (long long i = x5; i < x6 + 1; i++) {
    if (i >= x1 && i <= x2 && y6 >= y2 && y5 <= y1) first[i] = false;
  }
  for (long long i = y3; i < y4 + 1; i++) {
    if (i >= y1 && i <= y2 && x4 >= x2 && x3 <= x1) second[i] = false;
  }
  for (long long i = y5; i < y6 + 1; i++) {
    if (i >= y1 && i <= y2 && x6 >= x2 && x5 <= x1) second[i] = false;
  }
  bool ex1 = false, ex2 = false;
  for (long long i = 0; i < x2 + 1; i++) {
    if (first[i] == true) ex1 = true;
  }
  for (long long i = 0; i < y2 + 1; i++) {
    if (second[i] == true) ex2 = true;
  }
  if (ex1 == false) {
    if (x4 + 1 == x5 && x4 >= x1 && x5 <= x2) {
      ex1 = true;
    }
  }
  if (y5 > y3) {
    swap(x3, x5);
    swap(y3, y5);
    swap(x4, x6);
    swap(y4, y6);
  }
  if (ex2 == false) {
    if (y6 + 1 == y3 && y6 >= y1 && y3 <= y2) {
      ex2 = true;
    }
  }
  if (ex1 == false || ex2 == false)
    cout << "NO";
  else
    cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1, caseno = 1;
  while (t--) {
    solve();
  }
  cerr << "Time elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
}
