#include <bits/stdc++.h>
using namespace std;
long long int MAX = 1e6 + 1;
long long int mod = 1e9 + 7;
vector<long long int> inter(vector<long long int> &a,
                            vector<long long int> &b) {
  vector<long long int> v(4);
  v[0] = max(a[0], b[0]);
  v[1] = max(a[1], b[1]);
  v[2] = min(a[2], b[2]);
  v[3] = min(a[3], b[3]);
  return v;
}
long long int area(vector<long long int> &v) {
  if (v[3] - v[1] < 0 || v[2] - v[0] < 0) return 0;
  return (v[3] - v[1]) * (v[2] - v[0]);
}
void solve() {
  vector<long long int> v(4), a(4), b(4);
  for (long long int i = 0; i < 4; i++) cin >> v[i];
  for (long long int i = 0; i < 4; i++) cin >> a[i];
  for (long long int i = 0; i < 4; i++) cin >> b[i];
  vector<long long int> temp1 = inter(v, a);
  vector<long long int> temp2 = inter(v, b);
  vector<long long int> temp3 = inter(temp1, temp2);
  if (area(v) <= area(temp1) + area(temp2) - area(temp3))
    cout << "NO"
         << "\n";
  else
    cout << "YES"
         << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  for (long long int i = 0; i < t; i++) {
    solve();
  }
}
