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