#include <bits/stdc++.h>
using namespace std;
const int N = 1001;
int visited[N];
vector<long long int> m[N];
vector<long long int> ans;
long long int f = 0;
void dfs(int curr) {
  if (f == 1) return;
  for (auto i : m[curr]) {
    visited[i]++;
    if (visited[i] == 2) {
      ans.push_back(i);
      f = 1;
      return;
    }
    dfs(i);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int i, n, j;
  cin >> n;
  long long int ax, bx, ay, by, cx, cy;
  cin >> ax >> ay;
  cin >> bx >> by;
  cin >> cx >> cy;
  long long int f = 0;
  if (bx < ax && by < ay) {
    if (cx >= ax || cy >= ay) {
      f = 1;
    }
  } else if (bx < ax && by > ay) {
    if (cx >= ax || cy <= ay) f = 1;
  } else if (bx > ax && by < ay) {
    if (cx <= ax || cy >= ay) f = 1;
  } else if (bx > ax && by > ay) {
    if (cx <= ax || cy <= ay) f = 1;
  }
  if (f)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
