#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ax, ay, bx, by, cx, cy;
  cin >> n >> ax >> ay >> bx >> by >> cx >> cy;
  if (bx > ax) {
    if ((by > ay) && ((cx > ax) && (cy > ay)) ||
        (by < ay) && ((cx > ax) && (cy < ay))) {
      cout << "YES";
      return 0;
    }
  } else {
    if ((by > ay) && ((cx < ax) && (cy > ay)) ||
        (by < ay) && ((cx < ax) && (cy < ay))) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
