#include <bits/stdc++.h>
using namespace std;
pair<int, int> dir[8] = {{1, 1},  {1, 0},  {1, -1}, {0, 1},
                         {0, -1}, {-1, 1}, {-1, 0}, {-1, -1}};
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  int n;
  cin >> n;
  int ax, ay;
  cin >> ax >> ay;
  int bx, by;
  cin >> bx >> by;
  int cx, cy;
  cin >> cx >> cy;
  bool d[n + 2][n + 2];
  for (int i = 0; i < (n + 2); ++i)
    for (int j = 0; j < (n + 2); ++j) d[i][j] = false;
  for (int i = 0; i < (n + 2); ++i) d[0][i] = true;
  for (int i = 0; i < (n + 2); ++i) d[n + 1][i] = true;
  for (int i = 0; i < (n + 2); ++i) d[i][0] = true;
  for (int i = 0; i < (n + 2); ++i) d[i][n + 1] = true;
  for (int i = 0; i < (n + 2); ++i)
    for (int j = 0; j < (n + 2); ++j) {
      if (i == ax) d[i][j] = true;
      if (j == ay) d[i][j] = true;
      if (abs(i - ax) == abs(j - ay)) d[i][j] = true;
    }
  bool v[n + 2][n + 2];
  for (int i = 0; i < (n + 2); ++i)
    for (int j = 0; j < (n + 2); ++j) v[i][j] = false;
  queue<pair<int, int> > que;
  que.push({bx, by});
  v[bx][by] = true;
  while (!que.empty()) {
    auto t = que.front();
    que.pop();
    for (int i = 0; i < (8); ++i) {
      if (!v[t.first + dir[i].first][t.second + dir[i].second] &&
          !d[t.first + dir[i].first][t.second + dir[i].second]) {
        v[t.first + dir[i].first][t.second + dir[i].second] = true;
        que.push({t.first + dir[i].first, t.second + dir[i].second});
      }
    }
  }
  if (v[cx][cy])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
