#include <bits/stdc++.h>
using namespace std;
long long n, ax, ay, bx, by, cx, cy;
long long dp[1005][1005], vis[1005][1005];
void dfs(long long x, long long y) {
  if (x > n || x <= 0 || y > n || y <= 0 || vis[x][y]) return;
  vis[x][y] = 1;
  if (abs(x - ax) == abs(y - ay)) return;
  if (x == ax || y == ay) return;
  dp[x][y] = 1;
  dfs(x - 1, y - 1);
  dfs(x - 1, y);
  dfs(x - 1, y + 1);
  dfs(x, y + 1);
  dfs(x, y - 1);
  dfs(x + 1, y);
  dfs(x + 1, y + 1);
  dfs(x + 1, y - 1);
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  memset(dp, 0, sizeof dp);
  memset(vis, 0, sizeof vis);
  dfs(bx, by);
  string ans = dp[cx][cy] == 0 ? "NO" : "YES";
  cout << ans << '\n';
  return 0;
}
