#include <bits/stdc++.h>
using namespace std;
bool vis[1005][1005];
long long n, ans;
long long ax, ay, bx, by, cx, cy;
long long r[8] = {-1, -1, 0, 1, 1, +1, 0, -1};
long long c[8] = {0, +1, 1, 1, 0, -1, -1, -1};
void dfs(long long sx, long long sy) {
  vis[sx][sy] = 1;
  if (sx == cx && sy == cy) {
    ans = 1;
    return;
  }
  for (long long i = 0; i < 8; ++i) {
    long long nx = sx + r[i];
    long long ny = sy + c[i];
    if (nx >= 1 && nx <= n && ny >= 1 && ny <= n && (!vis[nx][ny])) dfs(nx, ny);
  }
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  for (long long c = 1; c <= n; c++) vis[ax][c] = 1;
  for (long long r = 1; r <= n; r++) vis[r][ay] = 1;
  long long r = ax, c = ay;
  while (r >= 1 && c <= n) vis[r][c] = 1, r--, c++;
  r = ax, c = ay;
  while (r >= 1 && c >= 1) vis[r][c] = 1, r--, c--;
  r = ax, c = ay;
  while (r <= n && c >= 1) vis[r][c] = 1, r++, c--;
  r = ax, c = ay;
  while (r <= n && c <= n) vis[r][c] = 1, r++, c++;
  if (!vis[bx][by]) dfs(bx, by);
  ans ? cout << "YES" : cout << "NO";
}
