#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, sum = 0, n, a, b, c, d, e, f;
  cin >> n;
  cin >> a >> b;
  cin >> c >> d;
  cin >> e >> f;
  if (c < a && d < b) {
    if (e < a && f < b) {
      cout << "YES";
    } else
      cout << "NO";
  } else if (c > a && d > b) {
    if (e > a && f > b) {
      cout << "YES";
    } else
      cout << "NO";
  } else if (c < a && d > b) {
    if (e < a && f > b) {
      cout << "YES";
    } else
      cout << "NO";
  } else if (c > a && d < b) {
    if (e > a && f < b) {
      cout << "YES";
    } else
      cout << "NO";
  }
}
