#include <bits/stdc++.h>
using namespace std;
int n;
int ax, ay, bx, by, cx, cy;
bool isChecked(int x, int y) {
  if (x == ax || y == ay || abs(ax - x) == abs(ay - y)) return true;
  return false;
}
bool isValid(int x, int y) { return x >= 0 && x < n && y >= 0 && y < n; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cin >> ax >> ay >> bx >> by >> cx >> cy;
  if ((bx - ax) * (cx - ax) > 0 && (by - ay) * (cy - ay) > 0) {
    cout << "YES\n";
    return 0;
  }
  cout << "NO\n";
  return 0;
}
