#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
const int maxn = 2e5 + 7;
int n;
int ax, ay, bx, by, cx, cy;
int c[maxn], r[maxn], dl[maxn], dr[maxn];
int dx[] = {0, 1, 1, 1, 0, -1, -1, -1};
int dy[] = {1, 1, 0, -1, -1, -1, 0, 1};
int m[1005][1005];
int main() {
  scanf("%d%d%d%d%d%d%d", &n, &ax, &ay, &bx, &by, &cx, &cy);
  r[ax] = c[ay] = dl[ax - ay + n] = dr[ax + ay] = 1;
  queue<pii> q;
  q.push({bx, by});
  while (!q.empty()) {
    int x = q.front().first, y = q.front().second;
    q.pop();
    for (int i = 0; i < 8; ++i) {
      int xx = x + dx[i];
      int yy = y + dy[i];
      if (xx > 0 && xx <= n && yy > 0 && yy <= n && !m[xx][yy] && !r[xx] &&
          !c[yy] && !dl[xx - yy + n] && !dr[xx + yy]) {
        q.push({xx, yy});
        m[xx][yy] = 1;
      }
    }
  }
  if (m[cx][cy])
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
