#include <bits/stdc++.h>
using namespace std;
complex<double> v, p, w1, w2, m1, m2;
int l, r;
complex<double> operator*(const complex<double>& d, double c) {
  return complex<double>(c, 0) * d;
}
double crs(complex<double> a, complex<double> b) { return imag(a * conj(b)); }
double dot(complex<double> a, complex<double> b) { return real(a * conj(b)); }
bool onl(complex<double> x, complex<double> a, complex<double> b) {
  return crs(a - x, b - x) == 0 && dot(a - x, b - x) <= 0;
}
bool ins(complex<double> a, complex<double> b, complex<double> c,
         complex<double> d) {
  double t1 = crs(c - a, b - a) * crs(b - a, d - a),
         t2 = crs(a - c, d - c) * crs(d - c, b - c);
  if (t1 < 0 || t2 < 0) return 0;
  if (t1 == 0 && t2 == 0)
    return onl(c, a, b) || onl(d, a, b);
  else
    return 1;
}
complex<double> sym(complex<double> x, complex<double> a, complex<double> b) {
  return x + 2 * dot(a, b) / dot(b, b) * b - a;
}
bool check() {
  if (ins(v, p, m1, m2)) return !ins(v, p, w1, w2) && crs(m2 - m1, p - v) == 0;
  if (ins(v, p, w1, w2)) {
    complex<double> V = sym(m1, v - m1, m2 - m1), P = sym(m1, p - m1, m2 - m1);
    return ins(v, P, m1, m2) && !ins(v, P, w1, w2) && !ins(V, p, w1, w2);
  }
  return 1;
}
int main() {
  scanf("%d%d", &l, &r), v = complex<double>(l, r);
  scanf("%d%d", &l, &r), p = complex<double>(l, r);
  scanf("%d%d", &l, &r), w1 = complex<double>(l, r);
  scanf("%d%d", &l, &r), w2 = complex<double>(l, r);
  scanf("%d%d", &l, &r), m1 = complex<double>(l, r);
  scanf("%d%d", &l, &r), m2 = complex<double>(l, r);
  puts(check() ? "YES" : "NO");
}
