#include <bits/stdc++.h>
using namespace std;
int n, ax, ay, bx, by, cx, cy;
int main() {
  cin >> n >> ax >> ay >> bx >> by >> cx >> cy;
  bx -= ax, by -= ay, cx -= ax, cy -= ay;
  cout << (bx * cx > 0 && by * cy > 0 ? "YES" : "NO");
}
