#include <bits/stdc++.h>
using namespace std;
double x[10], y[10];
bool checkin(double xx, double yy) {
  if (xx >= x[3] && yy >= y[3] && xx <= x[4] && yy <= y[4]) {
    return false;
  } else if (xx >= x[5] && yy >= y[5] && xx <= x[6] && yy <= y[6]) {
    return false;
  } else
    return true;
}
int main() {
  scanf("%lf%lf%lf%lf", &x[1], &y[1], &x[2], &y[2]);
  scanf("%lf%lf%lf%lf", &x[3], &y[3], &x[4], &y[4]);
  scanf("%lf%lf%lf%lf", &x[5], &y[5], &x[6], &y[6]);
  for (double i = 0; i <= y[2] - y[1]; i = i + 0.5) {
    if (checkin(x[1], y[1] + i) == true) {
      printf("YES\n");
      return 0;
    }
    if (checkin(x[2], y[1] + i) == true) {
      printf("YES\n");
      return 0;
    }
  }
  for (double i = 0; i <= x[2] - x[1]; i = i + 0.5) {
    if (checkin(x[1] + i, y[1]) == true) {
      printf("YES\n");
      return 0;
    }
    if (checkin(x[1] + i, y[2]) == true) {
      printf("YES\n");
      return 0;
    }
  }
  printf("NO\n");
  return 0;
}
