#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;
  int f1 = 0;
  int f2 = 0;
  int x = (bx - ax) * (cx - ax);
  int y = (by - ay) * (cy - ay);
  if (x > 0 and y > 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
