#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
long long power(long long B, long long P) {
  if (P == 0) return 1;
  long long X = power(B, P / 2);
  if (P % 2 == 0)
    return X * X;
  else
    return B * X * X;
}
long long fx[] = {1, -1, 0, 0};
long long fy[] = {0, 0, 1, -1};
long long A[300005], B[300005], C[300005], visited[300005], level[300005];
char CH[1000][1000], ch;
vector<long long> V;
vector<long long> G;
int main() {
  long long T, N, E, u, v, i, j, k, C = 0, sum = 0, ck = 0, x, y;
  string S, S1;
  long long x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6;
  cin >> x1 >> y1 >> x2 >> y2;
  cin >> x3 >> y3 >> x4 >> y4;
  cin >> x5 >> y5 >> x6 >> y6;
  if (x3 <= x1 && x2 <= x4 && y1 >= y3 && y2 <= y4) {
    cout << "NO";
    return 0;
  } else if (x5 <= x1 && x2 <= x6 && y1 >= y5 && y2 <= y6) {
    cout << "NO";
    return 0;
  } else if (x3 <= x1 && x5 <= x1 && x4 >= x2 && x6 >= x2) {
    if (y5 <= y1 && y4 >= y2 && y3 <= y6) {
      cout << "NO";
      return 0;
    }
    if (y3 <= y1 && y6 >= y2 && y4 >= y5) {
      cout << "NO";
      return 0;
    }
  } else if (y3 <= y1 && y5 <= y1 && y4 >= y2 && y6 >= y2) {
    if (x5 <= x1 && x4 >= x2 && x3 <= x6) {
      cout << "NO";
      return 0;
    }
    if (x3 <= x1 && x6 >= x2 && x4 >= x5) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
