#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
bool vis[N][N];
int n, ai, aj;
bool can(int i, int j) {
  if (ai == i || aj == j || i + j == ai + aj || i - j == ai - aj) return 0;
  return (i <= n && i >= 1 && j <= n && j >= 1);
}
int bi, bj, ci, cj;
int di[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dj[] = {1, -1, 0, 1, -1, 0, 1, -1};
void dfs(int i, int j) {
  if (!can(i, j) || vis[i][j]) return;
  vis[i][j] = 1;
  for (int z = 0; z < 8; ++z) dfs(i + di[z], j + dj[z]);
}
int main() {
  cin >> n >> ai >> aj >> bi >> bj >> ci >> cj;
  dfs(bi, bj);
  if (vis[ci][cj])
    puts("YES");
  else
    puts("NO");
}
