#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x1, y1, x2, y2, x, y, flag = 0;
  cin >> n >> x1 >> y1 >> x2 >> y2 >> x >> y;
  if (x2 < x1 && y2 > y1 && x < x1 && y > y1 ||
      x2 < x1 && y2 < y1 && x < x1 && y < y1 ||
      x2 > x1 && y2 > y1 && x > x1 && y > y1 ||
      x2 > x1 && y2 < y1 && x > x1 && y < y1)
    flag = 1;
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
