#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
} p[10];
bool check1(double x1, double y1) {
  double x3 = p[3].x;
  double x4 = p[4].x;
  double y3 = p[3].y;
  double y4 = p[4].y;
  if (x1 >= x3 && x1 <= x4 && y1 >= y3 && y1 <= y4) return true;
  return false;
}
bool check2(double x1, double y1) {
  double x5 = p[5].x;
  double x6 = p[6].x;
  double y5 = p[5].y;
  double y6 = p[6].y;
  if (x1 >= x5 && x1 <= x6 && y1 >= y5 && y1 <= y6) return true;
  return false;
}
int main() {
  for (int i = 1; i <= 6; i++) {
    scanf("%lf%lf", &p[i].x, &p[i].y);
  }
  bool has = false;
  for (double i = p[1].x; i <= p[2].x; i += 0.5) {
    if ((check1(i, p[1].y) || check2(i, p[1].y)) &&
        (check1(i, p[2].y) || check2(i, p[2].y)))
      ;
    else
      has = true;
  }
  for (double i = p[1].y; i <= p[2].y; i += 0.5) {
    if ((check1(p[1].x, i) || check2(p[1].x, i)) &&
        (check1(p[2].x, i) || check2(p[2].x, i)))
      ;
    else
      has = true;
  }
  if (has) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
