#include <bits/stdc++.h>
using namespace std;
int main() {
  int w_x1, w_x2, w_y1, w_y2, b_1x1, b_1x2, b_1y1, b_1y2, b_2x1, b_2y1, b_2x2,
      b_2y2;
  cin >> w_x1 >> w_y1 >> w_x2 >> w_y2;
  cin >> b_1x1 >> b_1y1 >> b_1x2 >> b_1y2;
  cin >> b_2x1 >> b_2y1 >> b_2x2 >> b_2y2;
  b_1x1 = max(b_1x1, w_x1);
  b_1y1 = max(b_1y1, w_y1);
  b_2x1 = max(b_2x1, w_x1);
  b_2y1 = max(b_2y1, w_y1);
  b_1x2 = min(b_1x2, w_x2);
  b_1y2 = min(b_1y2, w_y2);
  b_2x2 = min(b_2x2, w_x2);
  b_2y2 = min(b_2y2, w_y2);
  bool ans = true;
  if (b_2x1 == w_x1 && b_2y1 == w_y1) {
    swap(b_1x1, b_2x1);
    swap(b_1y1, b_2y1);
    swap(b_1x2, b_2x2);
    swap(b_1y2, b_2y2);
  }
  if (b_1x1 == w_x1 && b_1y1 == w_y1) {
    if (b_1x2 == w_x2 && b_1y2 == w_y2)
      ans = false;
    else if (b_2x2 == w_x2 && b_2y2 == w_y2) {
      if (b_2x1 == w_x1 && b_2y1 == w_y1)
        ans = false;
      else if (b_1x2 == w_x2 && b_2x1 == w_x1 && b_1y2 >= b_2y1)
        ans = false;
      else if (b_1y2 == w_y2 && b_2y1 == w_y1 && b_1x2 >= b_2x1)
        ans = false;
    }
  }
  if (ans)
    printf("YES");
  else
    printf("NO");
  cout << endl;
  getchar();
  getchar();
}
