#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-12;
pair<double, double> operator-(const pair<double, double>& lhs,
                               const pair<double, double>& rhs) {
  return pair<double, double>(lhs.first - rhs.first, lhs.second - rhs.second);
}
pair<double, double> operator+(const pair<double, double>& lhs,
                               const pair<double, double>& rhs) {
  return pair<double, double>(lhs.first + rhs.first, lhs.second + rhs.second);
}
pair<double, double> operator*(double t, pair<double, double> p) {
  return pair<double, double>(t * p.first, t * p.second);
}
pair<double, double> operator/(pair<double, double> p, double t) {
  return pair<double, double>(p.first / t, p.second / t);
}
pair<double, double> rot(pair<double, double> p) {
  return pair<double, double>(-p.second, p.first);
}
double Cross(const pair<double, double>& lhs, const pair<double, double>& rhs) {
  return lhs.first * rhs.second - lhs.second * rhs.first;
}
double Dot(const pair<double, double>& lhs, const pair<double, double>& rhs) {
  return lhs.first * rhs.first + lhs.second * rhs.second;
}
double Dist2(const pair<double, double>& lhs, const pair<double, double>& rhs) {
  return Dot(lhs - rhs, lhs - rhs);
}
bool onSegment(pair<double, double> a, pair<double, double> b,
               pair<double, double> c) {
  pair<double, double> v = c - a;
  pair<double, double> w = b - a;
  return abs(Cross(v, w)) < eps && 0 <= Dot(v, w) && Dot(v, w) <= Dot(v, v);
}
bool Intersects(pair<double, double> s0, pair<double, double> e0,
                pair<double, double> s1, pair<double, double> e1,
                bool includeDegenerateCase) {
  pair<double, double> a = s1 - s0;
  pair<double, double> v = e0 - s0;
  pair<double, double> w = s1 - e1;
  double det = Cross(v, w);
  double t0 = w.second * a.first - w.first * a.second;
  double t1 = -v.second * a.first + v.first * a.second;
  if (det < -eps) {
    if (det <= t0 && det <= t1 && t0 <= 0 && t1 <= 0) {
      return true;
    }
  } else if (det > eps) {
    if (0 <= t0 && 0 <= t1 && t0 <= det && t1 <= det) {
      return true;
    }
  }
  return includeDegenerateCase &&
         (onSegment(s0, s1, e0) || onSegment(s0, e1, e0) ||
          onSegment(s1, s0, e1) || onSegment(s1, e0, e1));
}
bool IntersectLineParam(pair<double, double> s0, pair<double, double> e0,
                        pair<double, double> s1, pair<double, double> e1,
                        double& t0, double& t1) {
  pair<double, double> a = s1 - s0;
  pair<double, double> v = e0 - s0;
  pair<double, double> w = s1 - e1;
  double det = Cross(v, w);
  if (abs(det) < eps) {
    return false;
  }
  t0 = Cross(a, w) / det;
  t1 = Cross(v, a) / det;
  return true;
}
pair<double, double> Interpolate(pair<double, double> s, pair<double, double> e,
                                 double t) {
  return (1 - t) * s + t * e;
}
bool IntersectLine(pair<double, double> s0, pair<double, double> e0,
                   pair<double, double> s1, pair<double, double> e1,
                   pair<double, double>& result) {
  double t0, t1;
  if (IntersectLineParam(s0, e0, s1, e1, t0, t1)) {
    result = Interpolate(s0, e0, t0);
    return true;
  }
  return false;
}
pair<double, double> mirror(pair<double, double> p, pair<double, double> s,
                            pair<double, double> e) {
  pair<double, double> r = rot(e - s);
  return p - 2 * Dot(p - s, r) / Dot(r, r) * r;
}
pair<double, double> read() {
  int a, b;
  cin >> a >> b;
  return pair<double, double>(a, b);
}
int main() {
  pair<double, double> v, p, w1, w2, m1, m2;
  v = read();
  p = read();
  w1 = read();
  w2 = read();
  m1 = read();
  m2 = read();
  if (!Intersects(v, p, w1, w2, true) && !Intersects(v, p, m1, m2, false)) {
    puts("YES");
    return 0;
  }
  if (!Intersects(v, p, m1, m2, false)) {
    pair<double, double> v2 = mirror(v, m1, m2);
    pair<double, double> m;
    if (Intersects(v2, p, m1, m2, true) && IntersectLine(v2, p, m1, m2, m)) {
      if (!Intersects(m, p, w1, w2, true) && !Intersects(m, v, w1, w2, true)) {
        puts("YES");
        return 0;
      }
    }
  }
  puts("NO");
  return 0;
}
