#include <bits/stdc++.h>
using namespace std;
long long common_segment(long long x1, long long x2, long long x3,
                         long long x4) {
  long long ans = min(x2, x4) - max(x1, x3);
  ans = max(ans, (long long)0);
  return ans;
}
long long common_area(long long x1, long long x2, long long y1, long long y2,
                      long long x3, long long x4, long long y3, long long y4) {
  long long l = common_segment(x1, x2, x3, x4);
  long long b = common_segment(y1, y2, y3, y4);
  long long area = l * b;
  return area;
}
long long common_3segment(long long x[]) {
  long long ans = min(min(x[2], x[4]), x[6]) - max(max(x[1], x[3]), x[5]);
  ans = max(ans, (long long)0);
  return ans;
}
long long common_3area(long long x[], long long y[]) {
  long long l = common_3segment(x);
  long long b = common_3segment(y);
  long long area = l * b;
  return area;
}
void solve() {
  long long x[7], y[7];
  for (long long i = 1; i <= 6; i++) cin >> x[i] >> y[i];
  long long covered =
      common_area(x[1], x[2], y[1], y[2], x[3], x[4], y[3], y[4]);
  covered += common_area(x[1], x[2], y[1], y[2], x[5], x[6], y[5], y[6]);
  covered -= common_3area(x, y);
  long long white = (x[2] - x[1]) * (y[2] - y[1]);
  if (white != covered)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
