#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
using namespace std;
const long long INF = 1LL << 60;
const double PI = acos(-1);
using ll = long long;
using P = array<ll, 2>;
template <typename T>
istream& operator>>(istream& i, vector<T>& v) {
  for (ll j = (0); j < (ll)(v.size()); ++j) i >> v[j];
  return i;
}
template <typename T>
string join(vector<T>& v) {
  stringstream s;
  for (ll i = (0); i < (ll)(v.size()); ++i) s << ' ' << v[i];
  return s.str().substr(1);
}
template <typename T>
ostream& operator<<(ostream& o, vector<T>& v) {
  if (v.size()) o << join(v);
  return o;
}
template <typename T>
string join(vector<vector<T>>& vv) {
  string s = "\n";
  for (ll i = (0); i < (ll)(vv.size()); ++i) s += join(vv[i]) + "\n";
  return s;
}
template <typename T>
ostream& operator<<(ostream& o, vector<vector<T>>& vv) {
  if (vv.size()) o << join(vv);
  return o;
}
template <typename T1, typename T2>
istream& operator>>(istream& i, pair<T1, T2>& v) {
  return i >> v.first >> v.second;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& o, pair<T1, T2>& v) {
  return o << "(" << v.first << "," << v.second << ")";
}
template <typename T>
istream& operator>>(istream& i, array<T, 2>& v) {
  i >> v[0] >> v[1];
  return i;
}
template <typename T>
ostream& operator<<(ostream& o, array<T, 2>& v) {
  return o << "(" << v[0] << "," << v[1] << ")";
  return o;
}
int dx[4]{0, 1, 0, -1};
int dy[4]{1, 0, -1, 0};
void init_init_init() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  std::cout << fixed << setprecision(10);
}
template <class T>
T up(T a, T b) {
  assert(b);
  return (a + b - 1) / b;
}
template <typename... A>
bool eq(A const&... a) {
  auto t = {a...};
  assert(t.size());
  auto tar = *t.begin();
  for (const auto& e : t)
    if (tar != e) return false;
  return true;
}
template <class T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmax(T& a, initializer_list<T> l) {
  return chmax(a, max(l));
}
template <class T>
bool chmin(T& a, initializer_list<T> l) {
  return chmin(a, min(l));
}
int main(int argc, char** argv) {
  init_init_init();
  ll x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  ll x3, y3, x4, y4;
  cin >> x3 >> y3 >> x4 >> y4;
  ll x5, y5, x6, y6;
  cin >> x5 >> y5 >> x6 >> y6;
  x1 *= 2, x2 *= 2, x3 *= 2, x4 *= 2, x5 *= 2, x6 *= 2;
  y1 *= 2, y2 *= 2, y3 *= 2, y4 *= 2, y5 *= 2, y6 *= 2;
  bool is{false};
  for (ll x = x1; x <= x2; x++) {
    ll y = y1;
    if (!((x3 <= x and x <= x4 and y3 <= y and y <= y4) or
          (x5 <= x and x <= x6 and y5 <= y and y <= y6))) {
      is = true;
    }
    y = y2;
    if (!((x3 <= x and x <= x4 and y3 <= y and y <= y4) or
          (x5 <= x and x <= x6 and y5 <= y and y <= y6))) {
      is = true;
    }
  }
  for (ll y = y1; y <= y2; ++y) {
    ll x = x1;
    if (!((x3 <= x and x <= x4 and y3 <= y and y <= y4) or
          (x5 <= x and x <= x6 and y5 <= y and y <= y6))) {
      is = true;
    }
    x = x2;
    if (!((x3 <= x and x <= x4 and y3 <= y and y <= y4) or
          (x5 <= x and x <= x6 and y5 <= y and y <= y6))) {
      is = true;
    }
  }
  auto ok = is;
  std::cout << (ok ? "YES" : "NO") << std::endl;
}
