#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e3 + 2;
const long long int inf = 1e16;
const long long int mod = 1e9 + 7;
bool chk(long long int ax, long long int ay, long long int bx,
         long long int by) {
  if ((ax - ay) == (bx - by)) return true;
  if (ax == ay || bx == by) return true;
  return false;
}
int main() {
  long long int n, i, j, k;
  cin >> n;
  long long int ax, ay, bx, by, cx, cy;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  bool ok = 0;
  if (((bx < ax && cx < ax) || (bx > ax && cx > ax)) && (by < ay && cy < ay))
    ok = 1;
  if (((bx < ax && cx < ax) || (bx > ax && cx > ax)) && (by > ay && cy > ay))
    ok = 1;
  if (ok)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
