#include <bits/stdc++.h>
const int N = 1003;
long long a[N][N];
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int qx, qy, kx, ky, x, y;
  cin >> qx >> qy >> kx >> ky >> x >> y;
  int i, j;
  memset(a, 0, sizeof(a));
  for (i = 1; i <= n; i++) a[qx][i] = a[i][qy] = 1;
  if (a[kx][ky] == 1 || a[x][y] == 1 || kx - ky == qx - qy || x - y == qx - qy)
    cout << "No", exit(0);
  while (kx != x) {
    if (x > kx)
      x--;
    else
      x++;
    if (a[x][y]) cout << "No", exit(0);
  }
  while (ky != y) {
    if (y > ky)
      y--;
    else
      y++;
    if (a[x][y]) cout << "No", exit(0);
  }
  cout << "Yes";
}
