#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const int N = 1e6 + 5;
int main() {
  int n, ax, ay, bx, by, cx, cy;
  cin >> n >> ax >> ay >> bx >> by >> cx >> cy;
  if (ax > bx && ax > cx) {
    if (ay > by && ay > cy) {
      cout << "YES" << endl;
      return 0;
    } else if (ay < by && ay < cy) {
      cout << "YES" << endl;
      return 0;
    }
  } else if (ax < bx && ax < cx) {
    if (ay > by && ay > cy) {
      cout << "YES" << endl;
      return 0;
    } else if (ay < by && ay < cy) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
