#include <bits/stdc++.h>
using namespace std;
long long n;
long long k = 0;
map<string, vector<string> > m;
map<string, int> dist;
map<string, int> vis;
void dfs(string node, long long dis) {
  vis[node] = 1;
  dist[node] = dis;
  for (auto i : m[node]) {
    if (vis[i] == 0) {
      k = max(k, dis);
      dfs(i, dis + 1);
    }
  }
}
void fun(string &s) {
  for (int i = 0; i < s.size(); i++) {
    s[i] = tolower(s[i]);
  }
  return;
}
void solve() {
  long long n;
  cin >> n;
  long long ax, ay, bx, by, cx, cy;
  cin >> ax >> ay;
  cin >> bx >> by >> cx >> cy;
  int quad1 = -1;
  int quad2 = -1;
  if (bx < ax && by < ay)
    quad1 = 1;
  else if (bx < ax && by > ay)
    quad1 = 2;
  else if (bx > ax && by < ay)
    quad1 = 3;
  else
    quad1 = 4;
  if (cx < ax && cy < ay)
    quad2 = 1;
  else if (cx < ax && cy > ay)
    quad2 = 2;
  else if (cx > ax && cy < ay)
    quad2 = 3;
  else
    quad2 = 4;
  if (quad1 == quad2)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
