#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  int ax, ay;
  cin >> ax >> ay;
  int bx, by;
  cin >> bx >> by;
  int cx, cy;
  cin >> cx >> cy;
  if ((bx < ax and by < ay) and (cx < ax and cy < ay)) {
    cout << "YES" << endl;
    return 0;
  }
  if ((bx > ax and by > ay) and (cx > ax and cy > ay)) {
    cout << "YES" << endl;
    return 0;
  }
  if ((bx < ax and by > ay) and (cx < ax and cy > ay)) {
    cout << "YES" << endl;
    return 0;
  }
  if ((bx > ax and by < ay) and (cx > ax and cy < ay)) {
    cout << "YES" << endl;
    return 0;
  }
  cout << "NO" << endl;
  return 0;
}
