#include <bits/stdc++.h>
using namespace std;
complex<double> v, p, w1, w2, m1, m2;
void scanCp(complex<double> &a) {
  double x = 0.0, y = 0.0;
  scanf("%lf%lf", &x, &y);
  a = complex<double>(x, y);
}
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 online(complex<double> x, complex<double> a, complex<double> b) {
  return crs(a - x, b - x) == 0 && dot(a - x, b - x) <= 0;
}
bool insect(complex<double> a, complex<double> b, complex<double> c,
            complex<double> d) {
  double t1 = crs(b - a, c - a) * crs(b - a, d - a),
         t2 = crs(d - c, a - c) * crs(d - c, b - c);
  if (t1 > 0 || t2 > 0) {
    return false;
  }
  if (t1 < 0 && t2 < 0) {
    return true;
  }
  return online(c, a, b) || online(d, a, b);
}
complex<double> getsym(complex<double> s, complex<double> a,
                       complex<double> b) {
  return s + b * b / a * complex<double>(dot(a, a) / dot(b, b), 0);
}
bool ck() {
  if (insect(v, p, m1, m2)) {
    return !insect(v, p, w1, w2) && crs(m2 - m1, v - p) == 0;
  }
  if (insect(v, p, w1, w2)) {
    complex<double> V = getsym(m1, v - m1, m2 - m1);
    complex<double> P = getsym(m1, p - m1, m2 - m1);
    return insect(v, P, m1, m2) && !insect(v, P, w1, w2) &&
           !insect(V, p, w1, w2);
  }
  return true;
}
int main() {
  scanCp(v);
  scanCp(p);
  scanCp(w1);
  scanCp(w2);
  scanCp(m1);
  scanCp(m2);
  if (ck()) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
