#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a1, a2, b1, b2, c1, c2;
  cin >> n;
  cin >> a1 >> a2;
  cin >> b1 >> b2;
  cin >> c1 >> c2;
  if ((a1 > b1 and a1 < c1) or (a1 > c1 and a1 < b1) or (a2 > b2 and a2 < c2) or
      (a2 > c2 and a2 < b2))
    cout << "NO";
  else
    cout << "YES";
}
