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