#include <bits/stdc++.h>
using namespace std;
bool is_correct(const pair<int, int>& what, const pair<int, int>& Alice,
                set<pair<int, int> >& visited, const int border) {
  if (what.first <= 1 || what.first >= border || what.second <= 1 ||
      what.second >= border || what.first == Alice.first ||
      what.second == Alice.second || (visited.find(what) != visited.end()) ||
      abs(Alice.first - what.first) == abs(Alice.second - what.second))
    return false;
  return true;
}
void dfs(const pair<int, int> where, const pair<int, int> Alice,
         const pair<int, int>& pos, set<pair<int, int> >& visited,
         const int border) {
  visited.insert(where);
  for (const pair<int, int>& go : {
           make_pair(where.first - 1, where.second),
           make_pair(where.first + 1, where.second),
           make_pair(where.first, where.second - 1),
           make_pair(where.first, where.second + 1),
           make_pair(where.first - 1, where.second - 1),
           make_pair(where.first - 1, where.second + 1),
           make_pair(where.first + 1, where.second - 1),
           make_pair(where.first + 1, where.second + 1),
       }) {
    if (go == pos) {
      std::cout << "YES";
      exit(0);
    }
    if (is_correct(go, Alice, visited, border))
      dfs(go, Alice, pos, visited, border);
  }
}
int main() {
  int n, x1, y1, x2, y2, x3, y3;
  std::cin >> n >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  const pair<int, int> Alice(x1, y1);
  const pair<int, int> Bob(x2, y2);
  const pair<int, int> position(x3, y3);
  set<pair<int, int> > visited;
  dfs(Bob, Alice, position, visited, n);
  std::cout << "NO";
  return 0;
}
