#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 + 5;
int n, m;
int g[MAXN][MAXN];
int res;
bool vis[MAXN][MAXN];
char s[MAXN];
void solve() {}
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  solve();
  int ai, aj, bi, bj, ci, cj;
  cin >> n;
  cin >> ai >> aj;
  cin >> bi >> bj;
  cin >> ci >> cj;
  memset(g, 0, sizeof(g));
  int dici[] = {0, 1, -1};
  int dicj[] = {0, 1, -1};
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (i == ai || j == aj || (abs(ai - i) == abs(aj - j))) {
        g[i][j] = 1;
      }
    }
  }
  bool f = false;
  queue<int> q;
  memset(vis, 0, sizeof(vis));
  q.push(bi);
  q.push(bj);
  while (!q.empty()) {
    int i = q.front();
    q.pop();
    int j = q.front();
    q.pop();
    if (i == ci && j == cj) {
      f = true;
      break;
    }
    if (vis[i][j]) continue;
    vis[i][j] = 1;
    for (int u = 0; u < 3; u++) {
      for (int v = 0; v < 3; v++) {
        int x = i + dici[u];
        int y = j + dicj[v];
        if (x > n || x < 1 || y > n || y < 1) continue;
        if ((!vis[x][y]) && (g[x][y] == 0)) {
          q.push(x);
          q.push(y);
        }
      }
    }
  }
  cout << (f ? "YES" : "NO") << endl;
  return 0;
}
