#include <bits/stdc++.h>
using namespace std;
template <typename T>
const T INF = (is_same<T, int>::value ? 1e9 : 1e18);
template <typename T>
inline T mod(T n, T mod) {
  T res = n % mod;
  if (res < 0) res += mod;
  return res;
}
struct r {
  long long x1, y1, x2, y2;
};
r solve(r X, r Y) {
  r R;
  R.x1 = max(X.x1, Y.x1);
  R.y1 = max(X.y1, Y.y1);
  R.x2 = min(X.x2, Y.x2);
  R.y2 = min(X.y2, Y.y2);
  return R;
}
long long calc(r R) {
  if (R.x2 < R.x1 or R.y2 < R.y1) return 0LL;
  return (R.x2 - R.x1) * (R.y2 - R.y1);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  r A, B, C, D;
  cin >> A.x1 >> A.y1 >> A.x2 >> A.y2;
  cin >> B.x1 >> B.y1 >> B.x2 >> B.y2;
  cin >> C.x1 >> C.y1 >> C.x2 >> C.y2;
  B = solve(A, B);
  C = solve(A, C);
  D = solve(B, C);
  long long area = calc(A) - calc(B) - calc(C) + calc(D);
  if (area > 0LL)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
