#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool read(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c<'0' | c> '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
const long long N = 1005;
long long ara[N][N];
long long vis[N][N];
queue<pair<long long, long long> > q;
int main() {
  long long n = ({
    long long a;
    read(a);
    a;
  });
  long long qx = ({
    long long a;
    read(a);
    a;
  }),
            qy = ({
              long long a;
              read(a);
              a;
            }),
            kx = ({
              long long a;
              read(a);
              a;
            }),
            ky = ({
              long long a;
              read(a);
              a;
            }),
            cx = ({
              long long a;
              read(a);
              a;
            }),
            cy = ({
              long long a;
              read(a);
              a;
            });
  ara[qx][qy] = 1;
  long long x = qx, y = qy;
  while (y <= n) ara[x][y] = 1, ++y;
  x = qx, y = qy;
  while (y >= 1) ara[x][y] = 1, --y;
  x = qx, y = qy;
  while (x <= n && y <= n) ara[x][y] = 1, ++x, ++y;
  x = qx, y = qy;
  while (x >= 1 && y >= 1) ara[x][y] = 1, --x, --y;
  x = qx, y = qy;
  while (x >= 1) ara[x][y] = 1, --x;
  x = qx, y = qy;
  while (x <= n) ara[x][y] = 1, ++x;
  x = qx, y = qy;
  while (x >= 1 && y <= n) ara[x][y] = 1, --x, ++y;
  x = qx, y = qy;
  while (x <= n && y >= 1) ara[x][y] = 1, ++x, --y;
  bool f = false;
  q.push({kx, ky});
  while (!q.empty()) {
    kx = q.front().first;
    ky = q.front().second;
    q.pop();
    if (ara[kx][ky] == 1) continue;
    if (kx == cx && ky == cy) {
      f = true;
      break;
    }
    vis[kx][ky] = 1;
    if (kx >= 1 && kx <= n && ky + 1 >= 1 && ky + 1 <= n && !vis[kx][ky + 1] &&
        ara[kx][ky + 1] == 0) {
      q.push({kx, ky + 1});
      vis[kx][ky + 1] = 1;
    }
    if (kx >= 1 && kx <= n && ky - 1 >= 1 && ky - 1 <= n && !vis[kx][ky - 1] &&
        ara[kx][ky - 1] == 0) {
      q.push({kx, ky - 1});
      vis[kx][ky - 1] = 1;
    }
    if (!vis[kx + 1][ky + 1] && kx + 1 >= 1 && kx + 1 <= n && ky + 1 >= 1 &&
        ky + 1 <= n && ara[kx + 1][ky + 1] == 0) {
      q.push({kx + 1, ky + 1});
      vis[kx + 1][ky + 1] = 1;
    }
    if (!vis[kx - 1][ky - 1] && kx - 1 >= 1 && kx - 1 <= n && ky - 1 >= 1 &&
        ky - 1 <= n && ara[kx - 1][ky - 1] == 0) {
      q.push({kx - 1, ky - 1});
      vis[kx - 1][ky - 1] = 1;
    }
    if (!vis[kx - 1][ky] && kx - 1 >= 1 && kx - 1 <= n && ky >= 1 && ky <= n &&
        ara[kx - 1][ky] == 0) {
      q.push({kx - 1, ky});
      vis[kx - 1][ky] = 1;
    }
    if (!vis[kx + 1][ky] && kx + 1 >= 1 && kx + 1 <= n && ky >= 1 && ky <= n &&
        ara[kx + 1][ky] == 0) {
      q.push({kx + 1, ky});
      vis[kx + 1][ky] = 1;
    }
    if (!vis[kx - 1][ky + 1] && kx - 1 >= 1 && kx - 1 <= n && ky + 1 >= 1 &&
        ky + 1 <= n && ara[kx - 1][ky + 1] == 0) {
      q.push({kx - 1, ky + 1});
      vis[kx - 1][ky + 1] = 1;
    }
    if (!vis[kx + 1][ky - 1] && kx + 1 >= 1 && kx + 1 <= n && ky - 1 >= 1 &&
        ky - 1 <= n && ara[kx + 1][ky - 1] == 0) {
      q.push({kx + 1, ky - 1});
      vis[kx + 1][ky - 1] = 1;
    }
  }
  if (f)
    puts("YES");
  else
    puts("NO");
}
