#include <bits/stdc++.h>
using namespace std;
bool checkPoint(int x, int y, int B[], int C[]) {
  if (x >= B[0] && x <= B[2] && y >= B[1] && y <= B[3]) return 1;
  if (x >= C[0] && x <= C[2] && y >= C[1] && y <= C[3]) return 1;
  return 0;
}
bool checkFunc(int A[], int B[], int C[]) {
  bool a = checkPoint(A[0], A[1], B, C);
  bool b = checkPoint(A[2], A[1], B, C);
  bool c = checkPoint(A[0], A[3], B, C);
  bool d = checkPoint(A[2], A[3], B, C);
  if (a & b & c & d)
    return 1;
  else
    return 0;
}
bool checka(int A[], int B[]) {
  if (A[0] >= B[0] && A[2] <= B[2] && A[1] >= B[1] && A[3] <= B[3]) return 1;
  return 0;
}
int main() {
  int A[4];
  int B[4];
  int C[4];
  for (int i = 0; i < 4; i++) scanf("%d", &A[i]);
  for (int i = 0; i < 4; i++) scanf("%d", &B[i]);
  for (int i = 0; i < 4; i++) scanf("%d", &C[i]);
  bool check = checkFunc(A, B, C);
  if (check) {
    bool flag = 1;
    if (B[0] < C[0] && B[2] < C[0]) flag = 0;
    if (B[0] > C[0] && C[2] < B[0]) flag = 0;
    if (B[1] < C[1] && B[3] < C[1]) flag = 0;
    if (B[1] > C[1] && C[3] < B[1]) flag = 0;
    if (checka(A, B) || checka(A, C)) flag = 1;
    if (flag)
      std::cout << "NO" << std::endl;
    else
      std::cout << "YES" << std::endl;
  } else {
    std::cout << "YES" << std::endl;
  }
}
