#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
const int N = 1005;
int col[N][N];
bool visited[N][N];
int n;
int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int dy[] = {-1, -1, -1, 0, 0, 1, 1, 1};
void dfs(int x, int y) {
  if (x < 1 || y < 1 || x > n || y > n) return;
  col[x][y] = 2;
  visited[x][y] = 1;
  for (int i = 0; i < 8; i++) {
    int x_ = x + dx[i];
    int y_ = y + dy[i];
    if (!visited[x_][y_] && col[x_][y_] == 0) dfs(x_, y_);
  }
  return;
}
int main() {
  fast();
  cin >> n;
  int ax, ay;
  int bx, by;
  int cx, cy;
  cin >> ax >> ay;
  cin >> bx >> by;
  cin >> cx >> cy;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (ax == i || ay == j || i - j == ax - ay || i + j == ax + ay) {
        col[i][j] = 1;
      }
    }
  }
  dfs(bx, by);
  if (col[cx][cy] == 2) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
