#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int ax, bx, cx, ay, by, cy, n;
  cin >> n >> ax >> ay >> bx >> by >> cx >> cy;
  if (bx > ax && by > ay && cx > ax && cy > ay)
    cout << "YES";
  else if (bx < ax && by < ay && cx < ax && cy < ay)
    cout << "YES";
  else if (bx > ax && by < ay && cx > ax && cy < ay)
    cout << "YES";
  else if (bx < ax && by > ay && cx < ax && cy > ay)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
