#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1e3 + 123;
long long dx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
long long dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};
long long mrk[maxN][maxN], mrk2[maxN][maxN], n, a, b, c, d, e, f;
void dfs(long long x, long long y, long long h) {
  if (mrk[x][y] & (1 << h) || x <= 0 || x > n || y <= 0 || y > n) return;
  mrk[x][y] += (1 << h);
  dfs(x + dx[h], y + dy[h], h);
}
void dfs2(long long x, long long y) {
  if (mrk2[x][y] || mrk[x][y] || x <= 0 || x > n || y <= 0 || y > n) return;
  mrk2[x][y] = true;
  for (long long i = 0; i < 8; i++) dfs2(x + dx[i], y + dy[i]);
}
int32_t main() {
  cin >> n;
  cin >> a >> b;
  cin >> c >> d;
  cin >> e >> f;
  for (long long i = 0; i < 8; i++) {
    dfs(a, b, i);
  }
  dfs2(c, d);
  if (mrk2[e][f])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
