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