#include <bits/stdc++.h>
using namespace std;
const int M3 = 1005;
const int M4 = 10005;
const int M5 = 100005;
const int M6 = 1000005;
int n;
int Queen_X, Queen_Y;
int King_X, King_Y;
int Target_X, Target_Y;
int main() {
  cin >> n;
  cin >> Queen_X >> Queen_Y;
  cin >> King_X >> King_Y;
  cin >> Target_X >> Target_Y;
  int KX = King_X - Queen_X;
  int KY = King_Y - Queen_Y;
  int TX = Target_X - Queen_X;
  int TY = Target_Y - Queen_Y;
  if (KX * TX > 0 && KY * TY > 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
