#include <bits/stdc++.h>
using namespace std;
int n, rx, ry, a1, a2, b1, b2, x, y, cx, cy, dx[] = {-1, -1, -1, 0, 0, 1, 1, 1},
                                             dy[] = {-1, 0, 1, -1, 1, -1, 0, 1},
                                             np[5003][5003];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  cin >> rx >> ry;
  cin >> a1 >> b1;
  cin >> a2 >> b2;
  if (a1 == rx || a2 == rx || b1 == ry || b2 == ry) {
    cout << "NO";
    return 0;
  }
  if (a1 < rx && a2 > rx) {
    cout << "NO";
    return 0;
  }
  if (a2 < rx && a1 > rx) {
    cout << "NO";
    return 0;
  }
  if (b1 < ry && b2 > ry) {
    cout << "NO";
    return 0;
  }
  if (b2 < ry && b1 > ry) {
    cout << "NO";
    return 0;
  }
  x = rx;
  y = ry;
  while (true) {
    if (x == a1 && y == b1) {
      cout << "NO";
      return 0;
    }
    if (x == a2 && y == b2) {
      cout << "NO";
      return 0;
    }
    --x;
    --y;
    if (!x || !y) break;
  }
  x = rx;
  y = ry;
  while (true) {
    if (x == a1 && y == b1) {
      cout << "NO";
      return 0;
    }
    if (x == a2 && y == b2) {
      cout << "NO";
      return 0;
    }
    ++x;
    ++y;
    if (x == n + 1 || y == n + 1) break;
  }
  cout << "YES";
  return 0;
}
