#include <bits/stdc++.h>
using namespace std;
bool check(int x1, int y1, int x2, int y2, int x3, int y3) {
  if ((x1 >= x2) && (x1 <= x3) && (y1 >= y2) && (y1 <= y3))
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5 >> x6 >> y6;
  int f1 = check(x1, y1, x3, y3, x4, y4);
  int f2 = check(x2, y2, x3, y3, x4, y4);
  int f3 = check(x1, y1, x5, y5, x6, y6);
  int f4 = check(x2, y2, x5, y5, x6, y6);
  if ((f1 & f2) || (f3 & f4)) {
    cout << "NO" << endl;
  } else {
    int f = 0;
    if (check(x1, y1, x3, y3, x4, y4) && check(x2, y1, x3, y3, x4, y4)) {
      y1 = y4;
      f = 1;
    } else if (check(x1, y2, x3, y3, x4, y4) && check(x2, y2, x3, y3, x4, y4)) {
      y2 = y3;
      f = 1;
    } else if (check(x1, y1, x3, y3, x4, y4) && check(x1, y2, x3, y3, x4, y4)) {
      x1 = x4;
      f = 1;
    } else if (check(x2, y1, x3, y3, x4, y4) && check(x2, y2, x3, y3, x4, y4)) {
      x2 = x3;
      f = 1;
    }
    if (f) {
      int f5 = check(x1, y1, x5, y5, x6, y6);
      int f6 = check(x2, y2, x5, y5, x6, y6);
      if (f5 && f6)
        cout << "NO" << endl;
      else
        cout << "YES" << endl;
    } else
      cout << "YES" << endl;
  }
}
