#include <bits/stdc++.h>
using namespace std;
int lol(int a, int b, int x, int y) {
  if (x < a) {
    if (y < b) {
      return 1;
    } else {
      return 4;
    }
  } else {
    if (y < b) {
      return 2;
    } else {
      return 3;
    }
  }
}
int main() {
  int x[3], y[3];
  int n;
  cin >> n;
  for (int i = 0; i < 3; ++i) {
    cin >> x[i] >> y[i];
  }
  string ans = "NO";
  if (lol(x[0], y[0], x[1], y[1]) == lol(x[0], y[0], x[2], y[2])) {
    ans = "YES";
  }
  cout << ans;
  return 0;
}
