#include <bits/stdc++.h>
using namespace std;
int n, m;
int x[8], y[8];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> x[1] >> y[1] >> x[2] >> y[2];
  cin >> x[3] >> y[3] >> x[4] >> y[4];
  cin >> x[5] >> y[5] >> x[6] >> y[6];
  if (x[1] >= x[3] && y[1] >= y[3] && x[2] <= x[4] && y[2] <= y[4]) {
    cout << "NO";
    return 0;
  }
  if (x[1] >= x[5] && y[1] >= y[5] && x[2] <= x[6] && y[2] <= y[6]) {
    cout << "NO";
    return 0;
  }
  if (x[3] > x[5])
    swap(x[3], x[5]), swap(y[3], y[5]), swap(x[4], x[6]), swap(y[4], y[6]);
  if (y[3] <= y[1] && y[4] >= y[2] && x[3] <= x[1] && x[4] >= x[1] &&
      y[5] <= y[1] && y[6] >= y[2] && x[6] >= x[2] && x[4] >= x[5]) {
    cout << "NO";
    return 0;
  }
  if (y[4] < y[6])
    swap(y[4], y[6]), swap(x[4], x[6]), swap(x[3], x[5]), swap(y[3], y[5]);
  if (x[3] <= x[1] && x[4] >= x[2] && x[5] <= x[1] && x[6] >= x[2] &&
      y[4] >= y[2] && y[5] <= y[1] && y[6] >= y[3]) {
    cout << "NO";
    return 0;
  }
  cout << "YES";
  return 0;
}
