#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
template <class T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
const double EPS = 1e-4;
const double PI = acos(-1.0);
class Point {
 public:
  double x, y;
  Point() {
    this->x = 0.;
    this->y = 0.;
  }
  Point(double x, double y) {
    this->x = x;
    this->y = y;
  }
  Point operator+(Point o) { return Point(x + o.x, y + o.y); }
  Point operator-(Point o) { return Point(x - o.x, y - o.y); }
  Point add(Point o) { return Point(x + o.x, y + o.y); }
  Point sub(Point o) { return Point(x - o.x, y - o.y); }
  Point scale(double f) { return Point(x * f, y * f); }
  double mod() { return sqrt(x * x + y * y); }
};
double dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
bool zero(double x) { return fabs(x) < EPS; }
bool onSegment(Point x, Point a, Point b) {
  if (!zero(cross(a - x, b - x))) {
    return false;
  }
  return dot(a - x, b - x) <= EPS;
}
bool linesIntersection(Point a, Point b, Point c, Point d, Point &r) {
  double d1 = cross(c - a, b - a);
  double d2 = cross(d - a, b - a);
  if (fabs(d1 - d2) < EPS) return false;
  r = (d.scale(d1) - (c.scale(d2))).scale(1. / (d1 - d2));
  return true;
}
bool segsIntersect(Point a, Point b, Point c, Point d) {
  Point p;
  if (!linesIntersection(a, b, c, d, p)) {
    return false;
  }
  return onSegment(p, a, b) && onSegment(p, c, d);
}
int sign(double x) {
  if (zero(x)) return 0;
  return x < 0 ? -1 : 1;
}
Point reflect(Point x, Point a, Point b) {
  Point v = x - a;
  Point dir = b - a;
  dir = dir.scale(1. / dir.mod());
  Point pr = dir.scale(dot(dir, v));
  return a + (pr.scale(2.) - v);
}
int main() {
  double xv, yv, xp, yp, xw1, xw2, yw1, yw2, xm1, xm2, ym1, ym2;
  scanf("%lf %lf %lf %lf", &xv, &yv, &xp, &yp);
  scanf("%lf %lf %lf %lf", &xw1, &yw1, &xw2, &yw2);
  scanf("%lf %lf %lf %lf", &xm1, &ym1, &xm2, &ym2);
  Point m1, m2, w1, w2, v, p, p1;
  m1 = Point(xm1, ym1);
  m2 = Point(xm2, ym2);
  w1 = Point(xw1, yw1);
  w2 = Point(xw2, yw2);
  v = Point(xv, yv);
  p = Point(xp, yp);
  p1 = reflect(p, m1, m2);
  if (!segsIntersect(w1, w2, v, p) && !onSegment(w1, v, p) &&
      !onSegment(w2, v, p) &&
      (!segsIntersect(m1, m2, v, p) || (zero(cross(m1.sub(v), m1.sub(p))) &&
                                        zero(cross(m2.sub(v), m2.sub(p)))))) {
    cout << "YES" << endl;
    return 0;
  }
  int sideV = sign(cross(v.sub(m1), m2.sub(m1)));
  int sideP = sign(cross(p.sub(m1), m2.sub(m1)));
  if (sideV != sideP) {
    cout << "NO" << endl;
    return 0;
  }
  Point ref;
  bool touch = linesIntersection(v, reflect(p, m1, m2), m1, m2, ref);
  if (!touch || !onSegment(ref, m1, m2)) {
    cout << "NO" << endl;
    return 0;
  }
  if (!segsIntersect(w1, w2, v, ref) && !segsIntersect(w1, w2, p, ref)) {
    cout << "YES" << endl;
    return 0;
  }
  cout << "NO" << endl;
  return 0;
}
