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