#include <bits/stdc++.h>
using namespace std;
complex<double> a, b, ma, mb, wa, wb;
const double eps = 1e-9;
bool pd(complex<double> a, complex<double> b, complex<double> p,
        complex<double> q) {
  return imag((p - a) * conj(b - a)) * imag((q - a) * conj(b - a)) < -eps;
}
bool pd3(complex<double> a, complex<double> b, complex<double> p,
         complex<double> q) {
  return fabs(imag((p - a) * conj(b - a))) < eps &&
         fabs(imag((q - a) * conj(b - a))) < eps;
}
bool pd4(complex<double> a, complex<double> b, complex<double> p,
         complex<double> q) {
  return fabs(arg(b - a) - arg(p - a)) < eps && abs(p - a) < abs(b - a) - eps;
}
bool pd2(complex<double> a, complex<double> b, complex<double> p,
         complex<double> q) {
  return imag((p - a) * conj(b - a)) * imag((q - a) * conj(b - a)) < eps;
}
bool isintersect(complex<double> a, complex<double> b, complex<double> p,
                 complex<double> q) {
  return pd(a, b, p, q) && pd(p, q, a, b);
}
bool isintersect3(complex<double> a, complex<double> b, complex<double> p,
                  complex<double> q) {
  return pd2(a, b, p, q) && !pd3(a, b, p, q) && pd2(p, q, a, b);
}
bool isintersect2(complex<double> a, complex<double> b, complex<double> p,
                  complex<double> q) {
  if (pd3(a, b, p, q)) return pd4(a, b, p, q) || pd4(p, q, a, b);
  return isintersect3(a, b, p, q);
}
complex<double> intersect(complex<double> a, complex<double> b,
                          complex<double> p, complex<double> q) {
  double x = imag((p - a) * conj(b - a)), y = imag((b - a) * conj(q - a));
  return (x * q + y * p) / (x + y);
}
int main() {
  int xa, ya, xb, yb, xma, xmb, xwa, xwb, yma, ymb, ywa, ywb;
  scanf("%d%d%d%d%d%d%d%d%d%d%d%d", &xa, &ya, &xb, &yb, &xwa, &ywa, &xwb, &ywb,
        &xma, &yma, &xmb, &ymb);
  a = complex<double>(xa, ya);
  b = complex<double>(xb, yb);
  ma = complex<double>(xma, yma);
  mb = complex<double>(xmb, ymb);
  wa = complex<double>(xwa, ywa);
  wb = complex<double>(xwb, ywb);
  if ((!isintersect2(a, b, wa, wb)) && (!isintersect3(a, b, ma, mb)))
    return puts("YES"), 0;
  complex<double> bb =
      ma + (mb - ma) * conj(b - ma) * (mb - ma) / norm(mb - ma);
  if (!isintersect3(a, bb, ma, mb)) return puts("NO"), 0;
  complex<double> c = intersect(a, bb, ma, mb);
  if (isintersect2(a, c, wa, wb) || isintersect2(b, c, wa, wb))
    return puts("NO"), 0;
  puts("YES");
  return 0;
}
