#include <bits/stdc++.h>
using namespace std;
int m[1005][1005];
int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};
int n, ax, ay, bx, by, cx, cy;
struct node {
  int x, y;
};
queue<node> q;
int check(int x, int y) {
  if (x < 1 || x > n || y < 1 || y > n || m[x][y] == 1) return 0;
  if (x == bx || y == by) return 0;
  if (x + y == bx + by) return 0;
  if (x - y == bx - by) return 0;
  return 1;
}
int bfs() {
  node now, next;
  while (!q.empty()) {
    now = q.front();
    q.pop();
    if (now.x == cx && now.y == cy) return 1;
    for (int i = 0; i < 8; i++) {
      next.x = now.x + dx[i];
      next.y = now.y + dy[i];
      if (check(next.x, next.y)) {
        m[next.x][next.y] = 1;
        q.push(next);
      }
    }
  }
  return 0;
}
int main() {
  memset(m, 0, sizeof(m));
  scanf("%d", &n);
  scanf("%d %d", &bx, &by);
  scanf("%d %d", &ax, &ay);
  scanf("%d %d", &cx, &cy);
  ax = n - ax + 1;
  bx = n - bx + 1;
  cx = n - cx + 1;
  swap(ax, ay);
  swap(bx, by);
  swap(cx, cy);
  node s;
  s.x = ax;
  s.y = ay;
  q.push(s);
  m[ax][ay] = 1;
  if (bfs())
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
