#include <bits/stdc++.h>
struct point {
  double x, y;
};
struct line {
  point a, b;
};
static double dot(const point &a, const point &b) {
  return a.x * b.x + a.y * b.y;
}
static double mag(const point &p) { return std::sqrt(dot(p, p)); }
static point operator-(const point &a, const point &b) {
  return {a.x - b.x, a.y - b.y};
}
static point operator+(const point &a, const point &b) {
  return {a.x + b.x, a.y + b.y};
}
static point operator*(const double s, const point &p) {
  return {s * p.x, s * p.y};
}
static bool line_intersection(const line &u, const line &v, point *r) {
  const double a = u.b.x - u.a.x, b = v.a.x - v.b.x;
  const double c = u.b.y - u.a.y, d = v.a.y - v.b.y;
  const double p = v.a.x - u.a.x, q = v.a.y - u.a.y;
  const double det = a * d - b * c;
  const double s = d * p + -b * q;
  const double t = -c * p + a * q;
  if (det < 0.0   ? s <= 0.0 && det <= s && t <= 0.0 && det <= t
      : det > 0.0 ? 0.0 <= s && s <= det && 0.0 <= t && t <= det
                  : false) {
    if (r != nullptr) *r = u.a + s / det * (u.b - u.a);
    return true;
  }
  return false;
}
static bool line_intersection(const line &u, const line &v) {
  return line_intersection(u, v, nullptr);
}
static bool line_point_intersection(const line &l, const point &p) {
  const point a = l.a;
  const point b = l.b - a;
  if (b.y * (p.x - a.x) != b.x * (p.y - a.y)) return false;
  if (b.x == 0.0 && b.y == 0.0) return l.a.x == p.x && l.a.y == p.y;
  if (b.x < 0.0 && p.x - a.x > 0.0) return false;
  if (b.x > 0.0 && p.x - a.x < 0.0) return false;
  if (b.x < 0.0 && b.x > p.x - a.x) return false;
  if (b.x > 0.0 && b.x < p.x - a.x) return false;
  if (b.y < 0.0 && p.y - a.y > 0.0) return false;
  if (b.y > 0.0 && p.y - a.y < 0.0) return false;
  if (b.y < 0.0 && b.y > p.y - a.y) return false;
  if (b.y > 0.0 && b.y < p.y - a.y) return false;
  return true;
}
static bool line_covering(const line &u, const line &v) {
  return line_intersection(u, v) || line_point_intersection(u, v.a) ||
         line_point_intersection(u, v.b) || line_point_intersection(v, u.a) ||
         line_point_intersection(v, u.b);
}
static point projection(const point &p, const line &l) {
  const point u = l.b - l.a, v = p - l.a;
  const double m2 = dot(u, u);
  if (m2 == 0.0) return l.a - v;
  return l.a + dot(u, v) / m2 * u;
}
static bool reflection(const point &u, const point &v, const line &m,
                       point *r) {
  const point p = projection(u, m), q = u + 2 * (p - u);
  return !line_intersection({u, v}, m) && line_intersection({v, q}, m, r);
}
int main(int argc, char *argv[]) {
  point v, p;
  line w, m;
  if (fscanf(stdin, "%lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf", &v.x,
             &v.y, &p.x, &p.y, &w.a.x, &w.a.y, &w.b.x, &w.b.y, &m.a.x, &m.a.y,
             &m.b.x, &m.b.y) != 12) {
    fprintf(stderr, "fscanf: Coordinate IO error.\n");
    exit(EXIT_FAILURE);
  }
  point r;
  const bool d = !line_covering({p, v}, w) && !line_intersection({p, v}, m);
  const bool i = reflection(v, p, m, &r) && !line_covering({p, r}, w) &&
                 !line_covering({v, r}, w);
  puts(d || i ? "YES" : "NO");
  return EXIT_SUCCESS;
}
