#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> root(-1, -1);
class Rectangles {
 private:
  long long square;
  bool flag;
  pair<long long, long long> white[3], black[3][3], rectangle[3][3];

 public:
  Rectangles() {}
  ~Rectangles() {}
  void get_data() {
    scanf("%I64d %I64d %I64d %I64d", &white[1].first, &white[1].second,
          &white[2].first, &white[2].second);
    scanf("%I64d %I64d %I64d %I64d", &black[1][1].first, &black[1][1].second,
          &black[1][2].first, &black[1][2].second);
    scanf("%I64d %I64d %I64d %I64d", &black[2][1].first, &black[2][1].second,
          &black[2][2].first, &black[2][2].second);
    square =
        (white[2].first - white[1].first) * (white[2].second - white[1].second);
  }
  void get_rectangle(long long num) {
    vector<long long> x, y;
    for (long long i = 1; i <= 2; i++) {
      x.push_back(white[i].first);
      x.push_back(black[num][i].first);
      y.push_back(white[i].second);
      y.push_back(black[num][i].second);
    }
    sort(x.begin(), x.end());
    sort(y.begin(), y.end());
    if (!judge(white, black[num])) {
      rectangle[num][1] = root;
      rectangle[num][2] = root;
    } else {
      rectangle[num][1] = make_pair(x[1], y[1]);
      rectangle[num][2] = make_pair(x[2], y[2]);
    }
  }
  void get_rectangles() {
    get_rectangle(1);
    get_rectangle(2);
  }
  bool judge(pair<long long, long long> rec1[3],
             pair<long long, long long> rec2[3]) {
    if (rec1[2].first <= rec2[1].first || rec2[2].first <= rec1[1].first)
      return false;
    else if (rec1[1].second >= rec2[2].second ||
             rec2[1].second >= rec1[2].second)
      return false;
    else if (rec1[1].first >= rec2[2].first || rec2[1].first >= rec1[2].first)
      return false;
    else if (rec1[2].second <= rec2[1].second ||
             rec2[2].second <= rec1[1].second)
      return false;
    return true;
  }
  void get_flag() {
    flag = false;
    long long wide, high;
    if (rectangle[1][1] == root && rectangle[2][1] == root)
      flag = false;
    else if (rectangle[1][1] == root) {
      wide = rectangle[2][2].first - rectangle[2][1].first;
      high = rectangle[2][2].second - rectangle[2][1].second;
      flag = wide * high == square ? true : false;
    } else if (rectangle[2][2] == root) {
      wide = rectangle[1][2].first - rectangle[1][1].first;
      high = rectangle[1][2].second - rectangle[1][1].second;
      flag = wide * high == square ? true : false;
    } else {
      wide = min(rectangle[1][2].first, rectangle[2][2].first) -
             max(rectangle[1][1].first, rectangle[2][1].first);
      high = min(rectangle[1][2].second, rectangle[2][2].second) -
             max(rectangle[1][1].second, rectangle[2][1].second);
      long long square1, square2;
      square1 = (rectangle[1][2].first - rectangle[1][1].first) *
                (rectangle[1][2].second - rectangle[1][1].second);
      square2 = (rectangle[2][2].first - rectangle[2][1].first) *
                (rectangle[2][2].second - rectangle[2][1].second);
      if (!judge(rectangle[1], rectangle[2])) {
        if (square1 + square2 == square)
          flag = true;
        else
          flag = false;
      } else {
        if (square1 + square2 - wide * high == square)
          flag = true;
        else
          flag = false;
      }
    }
  }
  void get_ans() {
    get_data();
    get_rectangles();
    get_flag();
    if (flag)
      printf("NO\n");
    else
      printf("YES\n");
  }
};
int main() {
  Rectangles r;
  r.get_ans();
  return 0;
}
