#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p) {
  return os << '(' << p.first << ", " << p.second << ')';
}
template <typename T_container, typename T = typename enable_if<
                                    !is_same<T_container, string>::value,
                                    typename T_container::value_type>::type>
ostream &operator<<(ostream &os, const T_container &v) {
  os << '{';
  string sep;
  for (const T &x : v) os << sep << x, sep = ", ";
  return os << '}';
}
void dbg_out() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
  cerr << ' ' << H;
  dbg_out(T...);
}
template <typename T_vector>
void output_vector(const T_vector &v, int add_val = 0) {
  for (int i = 0; i < int(v.size()); i++)
    cout << v[i] + add_val << (i != int(v.size()) - 1 ? ' ' : '\n');
}
int dx[] = {1, 0, 0, -1, 1, -1, 1, -1};
int dy[] = {0, 1, -1, 0, 1, -1, -1, 1};
vector<vector<bool>> vis;
int n;
void dfs(int x, int y, const vector<vector<int>> &wall) {
  vis[x][y] = true;
  for (int k = 0; k < 8; k++) {
    int nx = x + dx[k];
    int ny = y + dy[k];
    if (nx < 0 or ny < 0 or nx >= n or ny >= n) continue;
    if (!vis[nx][ny] and !wall[nx][ny]) {
      dfs(nx, ny, wall);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  vector<vector<int>> wall(n, vector<int>(n));
  vis = vector<vector<bool>>(n, vector<bool>(n));
  pair<int, int> a, b, c;
  cin >> a.first >> a.second;
  cin >> b.first >> b.second;
  cin >> c.first >> c.second;
  a.first -= 1;
  a.second -= 1;
  b.first -= 1;
  b.second -= 1;
  c.first -= 1;
  c.second -= 1;
  auto slope = [&](pair<int, int> a, pair<int, int> b) {
    int rise = a.second - b.second;
    int run = a.first - b.first;
    return (ld)rise / run;
  };
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == a.first) wall[i][j] = true;
      if (j == a.second) wall[i][j] = true;
      if (abs(slope({i, j}, a)) == 1.00) wall[i][j] = true;
    }
  }
  dfs(b.first, b.second, wall);
  if (vis[c.first][c.second]) {
    cout << "YES" << '\n';
  } else {
    cout << "NO" << '\n';
  }
  return 0;
}
