#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
  int kind;
  int id;
  Point() {}
  Point(double _x, double _y) {
    x = _x;
    y = _y;
  }
  Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }
  double operator^(const Point &b) const { return x * b.y - y * b.x; }
  double operator*(const Point &b) const { return x * b.x + y * b.y; }
  void transXY(double B) {
    double tx = x, ty = y;
    x = tx * cos(B) - ty * sin(B);
    y = tx * sin(B) + ty * cos(B);
  }
} V, P, W[2], M[2];
const double eps = 1e-8;
const double PI = acos(-1.0);
int sgn(double x) {
  if (fabs(x) < eps) return 0;
  if (x < 0)
    return -1;
  else
    return 1;
}
struct Line {
  Point s, e;
  Line() {}
  Line(Point _s, Point _e) {
    s = _s;
    e = _e;
  }
  pair<int, Point> operator&(const Line &b) const {
    Point res = s;
    if (sgn((s - e) ^ (b.s - b.e)) == 0) {
      if (sgn((s - b.e) ^ (b.s - b.e)) == 0)
        return make_pair(0, res);
      else
        return make_pair(1, res);
    }
    double t = ((s - b.s) ^ (b.s - b.e)) / ((s - e) ^ (b.s - b.e));
    res.x += (e.x - s.x) * t;
    res.y += (e.y - s.y) * t;
    return make_pair(2, res);
  }
};
bool inter(Line l1, Line l2) {
  return max(l1.s.x, l1.e.x) >= min(l2.s.x, l2.e.x) &&
         max(l2.s.x, l2.e.x) >= min(l1.s.x, l1.e.x) &&
         max(l1.s.y, l1.e.y) >= min(l2.s.y, l2.e.y) &&
         max(l2.s.y, l2.e.y) >= min(l1.s.y, l1.e.y) &&
         sgn((l2.s - l1.e) ^ (l1.s - l1.e)) *
                 sgn((l2.e - l1.e) ^ (l1.s - l1.e)) <=
             0 &&
         sgn((l1.s - l2.e) ^ (l2.s - l2.e)) *
                 sgn((l1.e - l2.e) ^ (l2.s - l2.e)) <=
             0;
}
void Sp(Point &A, Line X) {
  double a = X.e.y - X.s.y;
  double b = X.s.x - X.e.x;
  double c = X.s.y * (X.e.x - X.s.x) - X.s.x * (X.e.y - X.s.y);
  double x =
      ((b * b - a * a) * A.x - 2 * a * b * A.y - 2 * a * c) / (a * a + b * b);
  double y =
      ((a * a - b * b) * A.y - 2 * a * b * A.x - 2 * b * c) / (a * a + b * b);
  A.x = x;
  A.y = y;
}
int main() {
  scanf("%lf%lf%lf%lf", &V.x, &V.y, &P.x, &P.y);
  scanf("%lf%lf%lf%lf", &W[0].x, &W[0].y, &W[1].x, &W[1].y);
  scanf("%lf%lf%lf%lf", &M[0].x, &M[0].y, &M[1].x, &M[1].y);
  Line VP(V, P), WALL(W[0], W[1]), MIRROR(M[0], M[1]);
  if (!inter(VP, WALL) && ((M[0] - V) ^ (P - V)) == 0 &&
      ((M[1] - V) ^ (P - V)) == 0) {
    printf("YES\n");
  } else if (inter(VP, MIRROR)) {
    printf("NO\n");
  } else if (!inter(VP, WALL)) {
    printf("YES\n");
  } else {
    Point temp = V;
    Sp(temp, MIRROR);
    Line VP1(temp, P);
    temp = P;
    Sp(temp, MIRROR);
    Line VP2(temp, V);
    if (inter(VP1, MIRROR) && !inter(VP1, WALL) && !inter(VP2, WALL)) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}
