#include <bits/stdc++.h>
using namespace std;
long long int power(long long int a, long long int n) {
  long long int res = 1;
  while (n > 0) {
    if (n & 1)
      res = ((res % 1000000007) * (a % 1000000007)) % 1000000007, n--;
    else
      a = ((a % 1000000007) * (a % 1000000007)) % 1000000007, n /= 2;
  }
  return res;
}
long long int ax, ay, bx, by, cx, cy;
long long int dx[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long int dy[] = {0, 0, 1, -1, -1, -1, 1, 1};
long long int vis[1005][1005];
long long int n;
bool is_valid(long long int x, long long int y) {
  if (x < 1 || x > n || y < 1 || y > n) return false;
  if (vis[x][y] == 1) return false;
  if (x == ax || y == ay) return false;
  if (abs(x - ax) == abs(y - ay)) return false;
  return true;
}
void dfs(long long int x, long long int y) {
  vis[x][y] = 1;
  for (long long int i = 0; i < 8; i++) {
    long long int cx = x + dx[i];
    long long int cy = y + dy[i];
    if (is_valid(cx, cy)) {
      dfs(cx, cy);
    }
  }
}
void solve() {
  cin >> n;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  dfs(bx, by);
  if (vis[cx][cy])
    cout << "YES";
  else
    cout << "NO";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    solve();
  }
}
