#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
using ll = long long int;
int arr_min(int arr[], int a, int b) {
  int min = arr[0];
  for (int i = a; i != b; i++) {
    if (min > arr[i]) min = arr[i];
  }
  return min;
}
int arr_max(int arr[], int a, int b) {
  int max = arr[0];
  for (int i = a; i != b; i++) {
    if (max < arr[i]) max = arr[i];
  }
  return max;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t-- > 0) {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    int x3, y3, x4, y4;
    cin >> x3 >> y3 >> x4 >> y4;
    int x5, y5, x6, y6;
    cin >> x5 >> y5 >> x6 >> y6;
    if (x3 <= x1 && y3 <= y1 && x4 >= x2 && y4 >= y2) {
      cout << "NO" << endl;
      return 0;
    }
    if (x5 <= x1 && y5 <= y1 && x6 >= x2 && y6 >= y2) {
      cout << "NO" << endl;
      return 0;
    }
    if ((x3 <= x1 && y3 <= y1 && y4 >= y2 && x4 <= x2 && x4 >= x1) &&
        (x5 <= x4 && y5 <= y1 && y6 >= y2 && x6 >= x2)) {
      cout << "NO" << endl;
      return 0;
    }
    if ((x5 <= x1 && y5 <= y1 && y6 >= y2 && x6 <= x2 && x6 >= x1) &&
        (x3 <= x6 && y3 <= y1 && y4 >= y2 && x4 >= x2)) {
      cout << "NO" << endl;
      return 0;
    }
    if ((x3 <= x1 && y3 >= y1 && y3 <= y2 && y4 >= y2 && x4 >= x2) &&
        (x5 <= x1 && y5 <= y1 && y6 >= y3 && x6 >= x2)) {
      cout << "NO" << endl;
      return 0;
    }
    if ((x5 <= x1 && y5 >= y1 && y5 <= y2 && y6 >= y2 && x6 >= x2) &&
        (x3 <= x1 && y3 <= y1 && y4 >= y5 && x4 >= x2)) {
      cout << "NO" << endl;
      return 0;
    }
    cout << "YES" << endl;
  }
  return 0;
}
