#include <bits/stdc++.h>
using namespace std;
const unsigned int MOD = 1000000007;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  long long int qx, qy, kx, ky, cx, cy;
  cin >> qx >> qy >> kx >> ky >> cx >> cy;
  if (kx < qx && ky < qy && cx < qx && cy < qy)
    cout << "YES";
  else if (kx < qx && ky > qy && cx < qx && cy > qy)
    cout << "YES";
  else if (kx > qx && ky < qy && cx > qx && cy < qy)
    cout << "YES";
  else if (kx > qx && ky > qy && cx > qx && cy > qy)
    cout << "YES";
  else
    cout << "NO";
}
