#include <bits/stdc++.h>
using namespace std;
int n, ax, ay, bx, by, cx, cy, s[1111][1111];
int main() {
  scanf("%d%d%d%d%d%d%d", &n, &ax, &ay, &bx, &by, &cx, &cy);
  if ((by <= ay && cy <= ay && cx <= ax && bx <= ax) ||
      (by >= ay && cy >= ay && cx <= ax && bx <= ax) ||
      (by <= ay && cy <= ay && cx >= ax && bx >= ax) ||
      (by >= ay && cy >= ay && cx >= ax && bx >= ax))
    printf("YES");
  else
    printf("NO");
  return 0;
}
