#include <bits/stdc++.h>
using namespace std;
int n, ax, ay, cx, cy;
const vector<int> dx = {1, 1, 1, 0, 0, -1, -1, -1};
const vector<int> dy = {0, 1, -1, 1, -1, -1, 0, 1};
bool check(int x, int y) {
  if (x >= n || y >= n || x < 0 || y < 0) return false;
  if (x == ax || y == ay) return false;
  if (abs(ax - x) == abs(ay - y)) return false;
  return true;
}
void dfs(int x, int y, vector<vector<int>>& used) {
  used[x][y] = 1;
  if (x == cx && y == cy) return;
  for (int i = 0; i < 8; i++) {
    int new_x = x + dx[i];
    int new_y = y + dy[i];
    if (check(new_x, new_y))
      if (used[new_x][new_y] == 0) dfs(new_x, new_y, used);
  }
}
int main() {
  cin >> n;
  cin >> ax >> ay;
  ax--;
  ay--;
  int bx, by;
  cin >> bx >> by;
  bx--;
  by--;
  cin >> cx >> cy;
  cx--;
  cy--;
  vector<vector<int>> used(n, vector<int>(n, 0));
  dfs(bx, by, used);
  if (used[cx][cy] == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
