#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
long long test, n, m, k, x, y, ans, b[N], a[N];
void solve() {
  int ax, ay, bx, by, cx, cy;
  cin >> n >> ax >> ay >> bx >> by >> cx >> cy;
  if (bx > cx) swap(bx, cx);
  if (by > cy) swap(by, cy);
  if ((ax >= bx && ax <= cx) || (ay >= by && ay <= cy)) {
    cout << "NO";
    return;
  } else
    cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
