#include <bits/stdc++.h>
using namespace std;
const int maxN = 1007;
const int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
const int dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};
int n;
int ax, ay, bx, by, cx, cy;
bool flag;
bool mark[maxN][maxN];
inline bool check(const int& x, const int& y) {
  return x >= 1 && x <= n && y >= 1 && y <= n && x != ax && y != ay &&
         abs(x - ax) != abs(y - ay);
}
void dfs(int x, int y) {
  if (x == cx && y == cy) {
    flag = true;
    return;
  }
  mark[x][y] = true;
  for (int k = 0; k < 8 && !flag; k++) {
    int u = x + dx[k];
    int v = y + dy[k];
    if (check(u, v) && !mark[u][v]) dfs(u, v);
  }
}
void solve() {
  flag = false;
  dfs(bx, by);
  if (flag)
    printf("YES");
  else
    printf("NO");
}
void read() {
  scanf("%d", &n);
  scanf("%d %d %d %d %d %d", &ax, &ay, &bx, &by, &cx, &cy);
}
int main() {
  read();
  solve();
  return 0;
}
