#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, x, y;
  cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> x5 >> y5 >> x6 >> y6;
  long long a1, a2, a3, A;
  A = (x2 - x1) * (y2 - y1);
  if ((x3 >= x1 && x4 <= x2))
    x = x4 - x3;
  else if ((x3 <= x1 && x4 >= x2))
    x = x2 - x1;
  else if (x3 <= x1 && x4 >= x1)
    x = x4 - x1;
  else if (x3 <= x2 && x4 >= x2)
    x = x2 - x3;
  else
    x = 0;
  if ((y3 >= y1 && y4 <= y2))
    y = y4 - y3;
  else if ((y3 <= y1 && y4 >= y2))
    y = y2 - y1;
  else if (y3 <= y1 && y4 >= y1)
    y = y4 - y1;
  else if (y3 <= y2 && y4 >= y2)
    y = y2 - y3;
  else
    y = 0;
  a1 = x * y;
  if ((x5 >= x1 && x6 <= x2))
    x = x6 - x5;
  else if ((x5 <= x1 && x6 >= x2))
    x = x2 - x1;
  else if (x5 <= x1 && x6 >= x1)
    x = x6 - x1;
  else if (x5 <= x2 && x6 >= x2)
    x = x2 - x5;
  else
    x = 0;
  if ((y5 >= y1 && y6 <= y2))
    y = y6 - y5;
  else if ((y5 <= y1 && y6 >= y2))
    y = y2 - y1;
  else if (y5 <= y1 && y6 >= y1)
    y = y6 - y1;
  else if (y5 <= y2 && y6 >= y2)
    y = y2 - y5;
  else
    y = 0;
  a2 = x * y;
  if ((x3 >= x5 && x4 <= x6))
    x = x4 - x3;
  else if ((x3 <= x5 && x4 >= x6))
    x = x6 - x5;
  else if (x3 <= x5 && x4 >= x5)
    x = x4 - x5;
  else if (x3 <= x6 && x4 >= x6)
    x = x6 - x3;
  else
    x = 0;
  if ((y3 >= y5 && y4 <= y6))
    y = y4 - y3;
  else if ((y3 <= y5 && y4 >= y6))
    y = y6 - y5;
  else if (y3 <= y5 && y4 >= y5)
    y = y4 - y5;
  else if (y3 <= y6 && y4 >= y6)
    y = y6 - y3;
  else
    y = 0;
  a3 = x * y;
  if (a3 > 0) {
    long long x7, y7, x8, y8;
    x7 = max(x3, x5);
    x8 = min(x4, x6);
    y7 = max(y3, y5);
    y8 = min(y4, y6);
    if ((x7 >= x1 && x8 <= x2))
      x = x8 - x7;
    else if ((x7 <= x1 && x8 >= x2))
      x = x2 - x1;
    else if (x7 <= x1 && x8 >= x1)
      x = x8 - x1;
    else if (x7 <= x2 && x8 >= x2)
      x = x2 - x7;
    else
      x = 0;
    if ((y7 >= y1 && y8 <= y2))
      y = y8 - y7;
    else if ((y7 <= y1 && y8 >= y2))
      y = y2 - y1;
    else if (y7 <= y1 && y8 >= y1)
      y = y8 - y1;
    else if (y7 <= y2 && y8 >= y2)
      y = y2 - y7;
    else
      y = 0;
    a3 = x * y;
  }
  if (a1 + a2 - a3 < A)
    cout << "YES";
  else
    cout << "NO";
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
