#include <bits/stdc++.h>
using namespace std;
const long long int M = 2e3 + 10;
const long long int mod = 1e9 + 7;
const long long int infi = LLONG_MAX;
long long int ans, k, n, x, y, m, mymax = LLONG_MIN, mymin = LLONG_MAX, b, c, z,
                                  sum;
vector<long long int> v[M];
long long int board[M][M], visit[M][M];
long long int cmark(long long int x, long long int y, long long int dx,
                    long long int dy) {
  while (1) {
    if (x < 1 || y < 1 || x > n || y > n) return 0;
    board[x][y] = 1;
    x += dx;
    y += dy;
  }
}
long long int mark(long long int x, long long int y) {
  cmark(x, y, 1, 0);
  cmark(x, y, 0, 1);
  cmark(x, y, -1, 0);
  cmark(x, y, 0, -1);
  cmark(x, y, 1, 1);
  cmark(x, y, -1, -1);
  return 0;
}
long long int cx, cy;
long long int check(long long int bx, long long int by) {
  if (bx < 1 || by < 1 || bx > n || by > n) return 0;
  if (board[bx][by] == 1 || visit[bx][by] == 1) return 0;
  if (bx == cx && by == cy) return 1;
  visit[bx][by] = 1;
  long long int move[] = {1, -1, 0};
  long long int i;
  for (i = 0; i < 3; i++) {
    long long int j;
    for (j = 0; j < 3; j++)
      if (check(bx + move[i], by + move[j]) == 1) return 1;
  }
  return 0;
}
int main() {
  long long int i, j;
  scanf("%lld", &n);
  long long int ax, ay, bx, by;
  scanf("%lld %lld", &ax, &ay);
  scanf("%lld %lld", &bx, &by);
  scanf("%lld %lld", &cx, &cy);
  mark(ax, ay);
  if (check(bx, by) == 1)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
