#include <bits/stdc++.h>
using namespace std;
int const N = 2333, dx[] = {-1, -1, -1, 0, 0, 1, 1, 1},
          dy[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int n, ax, bx, cx, ay, by, cy, vis[N][N];
inline int check(int x, int y) {
  return x > 0 && y > 0 && x <= n && y <= n && !vis[x][y];
}
void dfs(int x, int y) {
  if (!check(x, y)) return;
  vis[x][y] = 1;
  for (int i = 0; i < 8; i++) {
    int tx = x + dx[i], ty = y + dy[i];
    if (check(tx, ty)) dfs(tx, ty);
  }
}
void init(int x, int y) {
  vis[x][y] = 2;
  for (int i = 0; i < 8; i++) {
    int tx = x + dx[i], ty = y + dy[i];
    while (check(tx, ty)) vis[tx][ty] = 2, tx += dx[i], ty += dy[i];
  }
}
int main() {
  cin >> n >> ax >> ay >> bx >> by >> cx >> cy;
  init(ax, ay);
  dfs(bx, by);
  cout << (vis[cx][cy] == 1 ? "YES" : "NO");
}
