#include <bits/stdc++.h>
using namespace std;
int getQuad(int x, int y) {
  if (x > 0) {
    if (y > 0) {
      return 1;
    } else {
      return 4;
    }
  } else {
    if (y > 0) {
      return 2;
    } else {
      return 3;
    }
  }
}
void solve() {
  int N;
  cin >> N;
  pair<int, int> foo[3];
  for (int i = 0; i < 3; i++) {
    cin >> foo[i].first >> foo[i].second;
  }
  for (int i = 1; i < 3; i++) {
    foo[i].first -= foo[0].first;
    foo[i].second -= foo[0].second;
  }
  bool ok = getQuad(foo[1].first, foo[1].second) ==
            getQuad(foo[2].first, foo[2].second);
  cout << (ok ? "YES" : "NO") << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int tt = 1;
  for (int i = 1; i <= tt; i++) {
    cerr << "Case #" << i << ": ";
    solve();
  }
  return 0;
}
