#include <bits/stdc++.h>
using namespace std;
long long int dx[] = {-1, 0, 1, 0};
long long int dy[] = {0, 1, 0, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, ai, aj, bi, bj, ci, cj;
  cin >> n;
  cin >> ai >> aj >> bi >> bj >> ci >> cj;
  if (((bi - ai) * (ci - ai)) > 0 && ((bj - aj) * (cj - aj)) > 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
