#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, y1, x2, y2, x3, y3, x4, y4;
  cin >> x1 >> y1 >> x2 >> y2;
  for (int i = 0; i < 2; i++) {
    cin >> x3 >> y3 >> x4 >> y4;
    if (x1 >= x3 && y1 >= y3 && x4 >= x2 && y4 >= y2) {
      cout << "NO";
      return 0;
    }
    if (x1 > x4 || x3 > x2 || y3 > y2 || y4 < y1) {
      continue;
    }
    if (x1 >= x3 && y1 >= y3 && x4 >= x2) y1 = y4;
    if (x1 >= x3 && y1 >= y3 && y4 >= y2) x1 = x4;
    if (x1 >= x3 && y4 >= y2 && x4 >= x2) y2 = y3;
    if (x4 >= x2 && y1 >= y3 && y4 >= y2) x2 = x3;
  }
  cout << "YES" << endl;
  return 0;
}
