#include <bits/stdc++.h>
using namespace std;
struct Punto {
  long long x, y;
};
struct Rectangulo {
  Punto ini, fin;
  Rectangulo(Punto a, Punto b) {
    ini = a;
    fin = b;
  }
  Rectangulo() {}
};
map<long long, long long> mapa;
long long ID(const long long &v) {
  if (!mapa[v]) mapa[v] = int(mapa.size());
  return mapa[v];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  vector<Rectangulo> v(3);
  set<long long> nums;
  vector<vector<bool> > mat(20, vector<bool>(20, true));
  for (long long i = 0; i < 3; i++) {
    Punto ini;
    Punto fin;
    cin >> ini.x >> ini.y >> fin.x >> fin.y;
    v[i] = Rectangulo(ini, fin);
    nums.insert(ini.x);
    nums.insert(ini.y);
    nums.insert(fin.x);
    nums.insert(fin.y);
  }
  for (auto i : nums) ID(i);
  for (long long i = 0; i < 3; i++) {
    v[i].ini.x = ID(v[i].ini.x);
    v[i].ini.y = ID(v[i].ini.y);
    v[i].fin.x = (ID(v[i].fin.x) - 1);
    v[i].fin.y = (ID(v[i].fin.y) - 1);
  }
  for (long long k = 1; k <= 2; k++) {
    Rectangulo rec(v[k].ini, v[k].fin);
    for (long long i = rec.ini.x; i <= rec.fin.x; i++)
      for (long long j = rec.ini.y; j <= rec.fin.y; j++) mat[i][j] = false;
  }
  for (long long i = v[0].ini.x; i <= v[0].fin.x; i++) {
    for (long long j = v[0].ini.y; j <= v[0].fin.y; j++) {
      if (mat[i][j]) {
        cout << "YES\n";
        return 0;
      }
    }
  }
  cout << "NO\n";
  return 0;
}
