#include <bits/stdc++.h>   using namespace std;   bool isPrime(long long int n) {     for (long long int i = 2; i <= sqrt(n); i++)       if (n % i == 0) return 0;     return 1;   }   long long knap_0_1(long long wt[], long long val[], long long n, long long w) {     long long kp[n + 1][w + 1];     for (long long i = 0; i <= n; i++) {       for (long long j = 0; j <= w; j++) {         if (i == 0 || j == 0)           kp[i][j] = 0;         else if (wt[i - 1] <= j)           kp[i][j] = max(val[i - 1] + kp[i - 1][j - wt[i - 1]], kp[i - 1][j]);         else           kp[i][j] = kp[i - 1][j];       }     }     return kp[n][w];   }   long long compute_xor_1_n(long long n) {     switch (n & 3) {       case 0:         return n;       case 1:         return 1;       case 2:         return n + 1;       case 3:         return 0;     }   }   bool isPowerOfTwo(long long x) { return x && (!(x & (x - 1))); }   void bfs(vector<long long> g[], long long vis[], long long i,            vector<long long> &v) {     queue<long long> q;     q.push(i);     vis[i] = 1;     while (!q.empty()) {       long long x = q.front();       q.pop();       v.push_back(x);       for (long long j = 0; j < g[x].size(); j++) {         if (vis[g[x][j]] == 0) {           vis[g[x][j]] = 1;           q.push(g[x][j]);         }       }     }   }   long long binary_Expo(long long x, long long n) {     long long result = 1;     while (n > 0) {       if (n % 2 == 1) result = result * x;       x = x * x;       n = n / 2;     }     return result;   }   long long mod_Expo(long long x, long long n, long long M) {     long long result = 1;     while (n > 0) {       if (n % 2 == 1) result = (result * x) % M;       x = (x * x) % M;       n = n / 2;     }     return result;   }   long long GCD(long long A, long long B) {     if (B == 0)       return A;     else       return GCD(B, A % B);   }   long long bs(long long a[], long long l, long long r, long long x,                long long n) {     while (r >= l) {       long long m = l + (r - l) / 2;     }     return -1;   }   void SieveOfEratosthenes(int n) {     bool prime[n + 1];     memset(prime, true, sizeof(prime));     for (int p = 2; p * p <= n; p++) {       if (prime[p] == true) {         for (int i = p * p; i <= n; i += p) prime[i] = false;       }     }     for (int p = 2; p <= n; p++)       if (prime[p]) cout << p <<    ;     cout << endl;   }   long long s1[8] = {1, 1, 1, -1, -1, -1, 0, 0};   long long f1[8] = {-1, 0, 1, -1, 0, 1, -1, 1};   void dfs(long long a1, long long a2, long long b1, long long b2, long long c1,            long long c2, long long &first, long long n, vector<long long> vis[]) {     vis[b1][b2] = 1;     if (a1 == b1 || a2 == b2 || (abs(a1 - b1) == abs(a2 - b2))) return;     if (b1 == c1 && b2 == c2) {       first = 1;       return;     }     for (long long i = 0; i < 8; i++) {       if (b1 + f1[i] <= 0 || b2 + s1[i] <= 0 || b1 + f1[i] > n ||           b2 + s1[i] > n || vis[b1 + f1[i]][b2 + s1[i]] == 1)         continue;       dfs(a1, a2, b1 + f1[i], b2 + s1[i], c1, c2, first, n, vis);       if (first == 1) return;     }   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     ;     long long n;     cin >> n;     long long a1, a2, b1, b2, c1, c2;     cin >> a1 >> a2;     cin >> b1 >> b2;     cin >> c1 >> c2;     long long first = 0;     vector<long long> vis[n + 1];     for (long long i = 0; i < n + 1; i++)       for (long long j = 0; j < n + 1; j++) vis[i].push_back(0);     dfs(a1, a2, b1, b2, c1, c2, first, n, vis);     if (first)       cout <<  YES  << endl;     else       cout <<  NO  << endl;     return 0;   }