#include <bits/stdc++.h>
using namespace std;
int main() {
  long long 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;
  long long firstheight = min(y4, y2) - max(y3, y1);
  long long firstlength = min(x4, x2) - max(x3, x1);
  long long secondheight = min(y6, y2) - max(y5, y1);
  long long secondlength = min(x6, x2) - max(x5, x1);
  long long firsttotal = firstheight * firstlength;
  if (firsttotal < 0) {
    firsttotal = 0;
  }
  long long secondtotal = secondheight * secondlength;
  if (secondtotal < 0) {
    secondtotal = 0;
  }
  long long overlap = (min(x4, min(x2, x6)) - max(x5, max(x3, x1))) *
                      (min(y4, min(y6, y2)) - max(y5, max(y3, y1)));
  if (overlap < 0) {
    overlap = 0;
  }
  if (firsttotal + secondtotal - overlap == (y2 - y1) * (x2 - x1)) {
    cout << "NO";
  } else {
    cout << "YES";
  }
}
