#include <bits/stdc++.h>
using namespace std;
struct ss {
  int x, y;
  ss(){};
  ss(int _x, int _y) {
    x = _x;
    y = _y;
  };
};
ss P1, P2, P3, P4, P5, P6, p1, p2, p3, p4, p5, p6;
int in(ss x, ss p1, ss p2) {
  if (p1.x <= x.x && x.x <= p2.x && p1.y <= x.y && x.y <= p2.y) return true;
  return false;
}
int main() {
  cin >> P1.x >> P1.y;
  cin >> P2.x >> P2.y;
  cin >> P3.x >> P3.y;
  cin >> P4.x >> P4.y;
  cin >> P5.x >> P5.y;
  cin >> P6.x >> P6.y;
  p1 = P1;
  p2 = P2;
  p3 = P3;
  p4 = P4;
  p5 = P5;
  p6 = P6;
  ss zuoshang = ss(P1.x, P2.y);
  ss youxia = ss(P2.x, P1.y);
  ss zuoxia = P1;
  ss youshang = P2;
  bool flag;
  if (in(p1, p3, p4) && in(p2, p3, p4) || in(p1, p5, p6) && in(p2, p5, p6)) {
    puts("NO");
  } else {
    if (in(zuoshang, p3, p4) && in(youshang, p3, p4)) {
      if (in(zuoxia, p5, p6) && in(youxia, p5, p6)) {
        if (P3.y <= P6.y) {
          puts("NO");
          return 0;
        } else {
          puts("YES");
          return 0;
        }
      } else {
        puts("YES");
        return 0;
      }
    }
    if (in(zuoshang, p3, p4) && in(zuoxia, p3, p4)) {
      if (in(youshang, p5, p6) && in(youxia, p5, p6)) {
        if (P4.x >= P5.x) {
          puts("NO");
          return 0;
        } else {
          puts("YES");
          return 0;
        }
      } else {
        puts("YES");
        return 0;
      }
    }
    if (in(zuoxia, p3, p4) && in(youxia, p3, p4)) {
      if (in(zuoshang, p5, p6) && in(youshang, p5, p6)) {
        if (P4.y >= P5.y) {
          puts("NO");
          return 0;
        } else {
          puts("YES");
          return 0;
        }
      } else {
        puts("YES");
        return 0;
      }
    }
    if (in(youxia, p3, p4) && in(youshang, p3, p4)) {
      if (in(zuoxia, p5, p6) && in(zuoshang, p5, p6)) {
        if (P3.x <= P6.x) {
          puts("NO");
          return 0;
        } else {
          puts("YES");
          return 0;
        }
      } else {
        puts("YES");
        return 0;
      }
    }
    puts("YES");
  }
  return 0;
}
