#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, i, x, y, x1, y1, x2, y2, j = 0, k = 0, h = 0;
  cin >> n;
  cin >> x1 >> y1;
  cin >> x2 >> y2;
  cin >> x >> y;
  if ((x1 <= x2 && x1 >= x) || (y1 <= y2 && y1 >= y) || (x1 >= x2 && x1 <= x) ||
      (y1 >= y2 && y1 <= y))
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
