#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int ax, ay, bx, by, cx, cy;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  long long int cpos = -1, tpos = -1;
  if (bx > ax) {
    if (by > ay) {
      if (bx - ax < by - ay)
        cpos = 1;
      else
        cpos = 2;
    } else if (by < ay) {
      if (abs(bx - ax) < abs(by - ay))
        cpos = 5;
      else
        cpos = 4;
    }
  } else {
    if (by > ay) {
      if (abs(bx - ax) < abs(by - ay))
        cpos = 11;
      else
        cpos = 10;
    } else if (by < ay) {
      if (abs(bx - ax) < abs(by - ay))
        cpos = 7;
      else
        cpos = 8;
    }
  }
  if (cx > ax) {
    if (cy > ay) {
      if (cx - ax < cy - ay)
        tpos = 1;
      else
        tpos = 2;
    } else if (cy < ay) {
      if (abs(cx - ax) < abs(cy - ay))
        tpos = 5;
      else
        tpos = 4;
    }
  } else {
    if (cy > ay) {
      if (abs(cx - ax) < abs(cy - ay))
        tpos = 11;
      else
        tpos = 10;
    } else if (cy < ay) {
      if (abs(cx - ax) < abs(cy - ay))
        tpos = 7;
      else
        tpos = 8;
    }
  }
  if (abs(tpos - cpos) <= 1)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
