#include <bits/stdc++.h>
using namespace std;
int dr[] = {+1, -1, +0, +0, +1, -1, -1, +1};
int dc[] = {+0, +0, +1, -1, +1, -1, +1, -1};
int main() {
  ios::sync_with_stdio(false);
  int chessSize, qColumn, qRow, mColumn, mRow, oColumn, oRow;
  cin >> chessSize >> qColumn >> qRow >> mColumn >> mRow >> oColumn >> oRow;
  if (mColumn < qColumn && mRow < qRow)
    if (oColumn < qColumn && oRow < qRow)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  else if (mColumn > qColumn && mRow > qRow)
    if (oColumn > qColumn && oRow > qRow)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  else if (mColumn > qColumn && mRow < qRow)
    if (oColumn > qColumn && oRow < qRow)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  else if (oColumn < qColumn && oRow > qRow)
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
}
