#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  int x3, y3, x4, y4;
  cin >> x3 >> y3 >> x4 >> y4;
  int x5, y5, x6, y6;
  cin >> x5 >> y5 >> x6 >> y6;
  bool ok = true;
  if (x3 <= x1 && x4 >= x2 && y3 <= y1 && y4 >= y2)
    ok = false;
  else if (x5 <= x1 && x6 >= x2 && y5 <= y1 && y6 >= y2)
    ok = false;
  else if (x3 <= x1 && x4 >= x2 && x5 <= x1 && x6 >= x2) {
    if (y5 <= y3 && y3 <= y6 && max(y6, y4) >= y2 && y5 <= y1)
      ok = false;
    else if (y3 <= y5 && y4 >= y5 && max(y6, y4) >= y2 && y3 <= y1)
      ok = false;
  } else if (y3 <= y1 && y4 >= y2 && y5 <= y1 && y6 >= y2) {
    if (x3 <= x5 && x4 >= x5 && max(x6, x4) >= x2 && x3 <= x1)
      ok = false;
    else if (x5 <= x3 && x3 <= x6 && max(x6, x4) >= x2 && x5 <= x1)
      ok = false;
  }
  (ok ? cout << "YES\n" : cout << "NO\n");
  return 0;
}
