#include <bits/stdc++.h>
using namespace std;
long long const tax = 1e9 + 7;
signed main() {
  long long ax, ay, bx, by, cx, cy, i, j;
  long long n;
  cin >> n;
  long long vis[n + 2][n + 2];
  cin >> ax >> ay;
  cin >> bx >> by;
  cin >> cx >> cy;
  long long x = ax, y = ay;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      vis[i][j] = 0;
      if (i == ax) {
        vis[i][j] = 1;
      }
      if (j == ay) {
        vis[i][j] = 1;
      }
    }
  }
  vis[x][y] = 1;
  while ((x < n) && (y < n)) {
    x++, y++;
    vis[x][y] = 1;
  }
  x = ax, y = ay;
  while ((x > 1) && (y > 1)) {
    x--, y--;
    vis[x][y] = 1;
  }
  x = ax, y = ay;
  while ((x > 1) && (y < n)) {
    x--, y++;
    vis[x][y] = 1;
  }
  x = ax, y = ay;
  while ((x < n) && (y > 1)) {
    x++, y--;
    vis[x][y] = 1;
  }
  vector<pair<long long, long long>> vec;
  vec.push_back({bx, by});
  x = bx, y = by;
  vis[x][y] = 1;
  while ((vec.size() > 0) && (vis[cx][cy] == 0)) {
    vector<pair<long long, long long>> new_vec;
    for (long long i = 0; i < vec.size(); i++) {
      x = vec[i].first;
      y = vec[i].second;
      if ((x > 1) && (vis[x - 1][y] == 0)) {
        vis[x - 1][y] = 1;
        new_vec.push_back({x - 1, y});
      }
      if ((x < n) && (vis[x + 1][y] == 0)) {
        vis[x + 1][y] = 1;
        new_vec.push_back({x + 1, y});
      }
      if ((y > 1) && (vis[x][y - 1] == 0)) {
        vis[x][y - 1] = 1;
        new_vec.push_back({x, y - 1});
      }
      if ((y < n) && (vis[x][y + 1] == 0)) {
        vis[x][y + 1] = 1;
        new_vec.push_back({x, y + 1});
      }
      if ((x > 1) && (y > 1) && (vis[x - 1][y - 1] == 0)) {
        vis[x - 1][y - 1] = 1;
        new_vec.push_back({x - 1, y - 1});
      }
      if ((x < n) && (y < n) && (vis[x + 1][y + 1] == 0)) {
        vis[x + 1][y + 1] = 1;
        new_vec.push_back({x + 1, y + 1});
      }
      if ((y > 1) && (x < n) && (vis[x + 1][y - 1] == 0)) {
        vis[x + 1][y - 1] = 1;
        new_vec.push_back({x + 1, y - 1});
      }
      if ((y < n) && (x > 1) && (vis[x - 1][y + 1] == 0)) {
        vis[x - 1][y + 1] = 1;
        new_vec.push_back({x - 1, y + 1});
      }
    }
    vec = new_vec;
  }
  if (vis[cx][cy] == 1) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
