#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x[12];
  long long int y[12];
  long long int i, n, k;
  k = 0;
  for (i = 0; i < 6; ++i) {
    cin >> x[i] >> y[i];
  }
  x[6] = max(x[0], x[2]);
  y[6] = max(y[0], y[2]);
  x[7] = min(x[1], x[3]);
  y[7] = min(y[1], y[3]);
  x[8] = max(x[0], x[4]);
  y[8] = max(y[0], y[4]);
  x[9] = min(x[1], x[5]);
  y[9] = min(y[1], y[5]);
  x[10] = max(x[6], x[8]);
  y[10] = max(y[6], y[8]);
  x[11] = min(x[7], x[9]);
  y[11] = min(y[7], y[9]);
  for (i = 6; i < 12; i += 2) {
    if ((x[i] > x[i + 1]) || (y[i] > y[i + 1])) {
      x[i] = x[i + 1];
      y[i] = y[i + 1];
    }
  }
  long long int s =
      (x[1] - x[0]) * (y[1] - y[0]) - (x[7] - x[6]) * (y[7] - y[6]) -
      (x[9] - x[8]) * (y[9] - y[8]) + (x[11] - x[10]) * (y[11] - y[10]);
  if ((s > 0)) k = 1;
  if (k == 1)
    cout << "YES";
  else
    cout << "NO";
}
