#include <bits/stdc++.h>
using namespace std;
const int maxN = 2050, maxV = 1001, MOD = 1e9 + 7, LG = 11, BASE = 29;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int ax, ay, bx, by, cx, cy;
  int n;
  cin >> n >> ax >> ay >> bx >> by >> cx >> cy;
  bx -= ax;
  cx -= ax;
  by -= ay;
  cy -= ay;
  if (bx * cx > 0 && by * cy > 0) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
}
