#include <bits/stdc++.h>
using namespace std;
const int fx[] = {+0, +0, +1, -1, -1, +1, -1, +1};
const int fy[] = {-1, +1, +0, +0, +1, +1, -1, -1};
const int Max = 1e3 + 10;
const int MOD = 1e9 + 7;
int arr[Max][Max], visited[Max][Max];
int n, ax, ay, bx, by, cx, cy;
void check() {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cout << arr[i][j] << " ";
    }
    cout << endl;
  }
}
void dfs(int x, int y) {
  if (x >= 0 and x < n and y >= 0 and y < n and arr[x][y] == 0) {
    arr[x][y] = 2;
    for (int i = 0; i < 8; i++) {
      dfs(x + fx[i], y + fy[i]);
    }
  } else
    return;
}
int main() {
  cin >> n >> ax >> ay >> bx >> by >> cx >> cy;
  memset(arr, 0, sizeof arr);
  ;
  for (int i = ay - 1; i < n; i++) {
    arr[ax - 1][i] = 1;
  }
  for (int i = ay - 1; i >= 0; i--) {
    arr[ax - 1][i] = 1;
  }
  for (int i = ax - 1; i < n; i++) {
    arr[i][ay - 1] = 1;
  }
  for (int i = ax - 1; i >= 0; i--) {
    arr[i][ay - 1] = 1;
  }
  for (int i = ax - 1, j = ay - 1; i < n and j < n; i++, j++) arr[i][j] = 1;
  for (int i = ax - 1, j = ay - 1; i >= 0 and j >= 0; i--, j--) arr[i][j] = 1;
  for (int i = ax - 1, j = ay - 1; i < n and j > 0; i++, j--) arr[i][j] = 1;
  for (int i = ax - 1, j = ay - 1; i > 0 and j < n; i--, j++) arr[i][j] = 1;
  dfs(bx - 1, by - 1);
  if (arr[cx - 1][cy - 1] == 2)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
