#include <bits/stdc++.h>
using namespace std;
void KhanhNgok() {
  int n;
  cin >> n;
  int ax, ay;
  cin >> ax >> ay;
  int bx, by;
  cin >> bx >> by;
  int cx, cy;
  cin >> cx >> cy;
  if ((ax - bx) * (ax - cx) < 0) {
    cout << "NO";
    return;
  }
  if ((ay - by) * (ay - cy) < 0) {
    cout << "NO";
    return;
  }
  cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    KhanhNgok();
  }
  return 0;
}
