#include <bits/stdc++.h>
using namespace std;
bool sieve[1000001];
void init() {
  long long i, j;
  sieve[0] = true;
  sieve[1] = true;
  for (i = 2; i < 1000001; i++) {
    if (!sieve[i]) {
      for (j = 2 * i; j < 1000001; j += i) sieve[j] = true;
    }
  }
}
long long power(long x, long n) {
  if (n == 0) return 1;
  if (n == 1) return x;
  long n2 = n / 2;
  long long po = power(x, n2);
  if (n % 2) return po * po * x;
  return po * po;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int G[1005][1005], n;
void dfs(int x, int y, int parx, int pary) {
  int i, j;
  G[x][y] = 1;
  for (i = -1; i < 2; i++) {
    for (j = -1; j < 2; j++) {
      if (x + i > 0 && x + i <= n && y + j > 0 && y + j <= n) {
        if (x + i == x && y + j == y) continue;
        if (x + i == parx && y + j == pary) continue;
        if (G[x + i][y + j] != 0) continue;
        dfs(x + i, y + j, x, y);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  int a[2], b[2], c[2], i, j;
  cin >> n >> a[0] >> a[1] >> b[0] >> b[1] >> c[0] >> c[1];
  G[a[0]][a[1]] = -1;
  for (i = 1; i < (n + 1); i++) {
    G[i][a[1]] = -1;
    G[a[0]][i] = -1;
  }
  for (i = 1; i < (n + 1); i++) {
    if (a[0] + i <= n && a[1] + i <= n) {
      G[a[0] + i][a[1] + i] = -1;
    }
    if (a[0] - i > 0 && a[1] - i > 0) {
      G[a[0] - i][a[1] - i] = -1;
    }
    if (a[0] + i <= n && a[1] - i > 0) {
      G[a[0] + i][a[1] - i] = -1;
    }
    if (a[0] - i > 0 && a[1] + i <= n) {
      G[a[0] - i][a[1] + i] = -1;
    }
  }
  dfs(b[0], b[1], 0, 0);
  if (G[c[0]][c[1]] == 1)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
