#include <bits/stdc++.h>
using namespace std;
const int INF = int(1e9) + 7;
const int MAXN = 10 + int(1e3);
int n;
pair<int, int> a, b, c;
bool mark[MAXN][MAXN];
bool in_bound(pair<int, int> x) {
  if (x.first < 1 || x.first > n || x.second < 1 || x.second > n) return false;
  return true;
}
bool checked(pair<int, int> x) {
  if (x.first == a.first) return true;
  if (x.second == a.second) return true;
  if (x.first + x.second == a.first + a.second) return true;
  if (x.first - x.second == a.first - a.second) return true;
  return false;
}
void BFS() {
  queue<pair<int, int> > qu;
  qu.push(b);
  mark[b.first][b.second] = true;
  while (!qu.empty()) {
    pair<int, int> top = qu.front();
    qu.pop();
    pair<int, int> cur;
    for (int i = -1; i <= 1; i++) {
      for (int j = -1; j <= 1; j++) {
        if (i == 0 && j == 0) continue;
        cur.first = top.first + i;
        cur.second = top.second + j;
        if (in_bound(cur) && !checked(cur) && !mark[cur.first][cur.second]) {
          if (cur == c) {
            printf("YES\n");
            exit(0);
          }
          qu.push(cur);
          mark[cur.first][cur.second] = 1;
        }
      }
    }
  }
  printf("NO\n");
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  cin >> a.first >> a.second;
  cin >> b.first >> b.second;
  cin >> c.first >> c.second;
  BFS();
  return 0;
}
