#include <bits/stdc++.h>
using namespace std;
int dir(int x, int y, int x0, int y0) {
  if (x < x0) {
    if (y < y0)
      return 1;
    else
      return 2;
  } else {
    if (y < y0)
      return 3;
    else
      return 4;
  }
}
int main() {
  int n;
  cin >> n;
  int ax, ay, bx, by, cx, cy;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  int da = dir(bx, by, ax, ay), db = dir(cx, cy, ax, ay);
  if (da == db)
    cout << "YES\n";
  else
    cout << "NO\n";
}
