#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long dx[3];
  long long dy[3];
  for (int i = (0); i < (3); ++i) {
    long long a, b;
    cin >> a >> b;
    dx[i] = a;
    dy[i] = b;
  }
  dx[1] -= dx[0];
  dx[2] -= dx[0];
  dy[1] -= dy[0];
  dy[2] -= dy[0];
  if (dx[1] * dx[2] > 0 && dy[1] * dy[2] > 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
