#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using PII = pair<int, int>;
using VPII = vector<PII>;
using VI = vector<int>;
using VVI = vector<VI>;
using Vll = vector<ll>;
using VVll = vector<Vll>;
using VC = vector<char>;
using VS = vector<string>;
using VB = vector<bool>;
const int INF = 1e9;
const ll MOD = 1e9 + 7;
int main() {
  ll x1, x2, x3, x4, x5, x6;
  ll y1, y2, y3, y4, y5, y6;
  cin >> x1 >> y1 >> x2 >> y2;
  cin >> x3 >> y3 >> x4 >> y4;
  cin >> x5 >> y5 >> x6 >> y6;
  if (x3 <= x1 && y3 <= y1) {
    if (x4 >= x2 && y4 >= y2) {
      cout << "NO" << endl;
      return 0;
    }
    if (y4 >= y2 && x1 <= x4 && x4 <= x2) x1 = x4;
    if (x4 >= x2 && y1 <= y4 && y4 <= y2) y1 = y4;
  }
  if (x2 <= x4 && y2 <= y4) {
    if (y3 <= y1 && x1 <= x3 && x3 <= x2) x2 = x3;
    if (x3 <= x1 && y1 <= y3 && y3 <= y2) y2 = y3;
  }
  if (x5 <= x1 && y5 <= y1) {
    if (x6 >= x2 && y6 >= y2) {
      cout << "NO" << endl;
      return 0;
    }
    if (y6 >= y2 && x1 <= x6 && x6 <= x2) x1 = x6;
    if (x6 >= x2 && y1 <= y6 && y6 <= y2) y1 = y6;
  }
  if (x2 <= x6 && y2 <= y6) {
    if (y5 <= y1 && x1 <= x5 && x5 <= x2) x2 = x5;
    if (x5 <= x1 && y1 <= y5 && y5 <= y2) y2 = y5;
  }
  if ((x2 - x1) * (y2 - y1) > 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
