#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double PI = acos(-1);
int dcmp(double x) {
  if (fabs(x) <= eps) return 0;
  return x > 0 ? 1 : -1;
}
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  void read() { scanf("%lf%lf", &x, &y); }
  void write() { printf("%f %f\n", x, y); }
} S, T, M, Mi[2], Wa[2];
inline Point operator+(const Point &A, const Point &B) {
  return Point(A.x + B.x, A.y + B.y);
}
inline Point operator-(const Point &A, const Point &B) {
  return Point(A.x - B.x, A.y - B.y);
}
inline Point operator*(const Point &A, const double &p) {
  return Point(A.x * p, A.y * p);
}
inline Point operator/(const Point &A, const double &p) {
  return Point(A.x / p, A.y / p);
}
inline bool operator==(const Point &A, const Point &B) {
  return dcmp(A.x - B.x) == 0 && dcmp(A.y - B.y) == 0;
}
inline bool operator<(const Point &A, const Point &B) {
  return A.x < B.x || (A.x == B.x || A.y < B.y);
}
inline double Dot(const Point &A, const Point &B) {
  return A.x * B.x + A.y * B.y;
}
inline double Length(const Point &A) { return sqrt(Dot(A, A)); }
inline double Dis(const Point &A, const Point &B) { return Length(B - A); }
inline double Cross(const Point &A, const Point &B) {
  return A.x * B.y - B.x * A.y;
}
inline double Angle(const Point &A, const Point &B) {
  return acos(Dot(A, B) / Length(A) / Length(B));
}
inline double Area(const Point &A, const Point &B, const Point &C) {
  return fabs(Cross(B - A, C - A)) / 2;
}
inline Point Inver(const Point &A, const Point &P) {
  return P + (A - P) / Length(A - P) / Length(A - P);
}
inline Point Rotate(const Point &A, const double r) {
  return Point(A.x * cos(r) - A.y * sin(r), A.x * sin(r) + A.y * cos(r));
}
void init() {
  S.read();
  T.read();
  if (S.x > T.x) swap(S, T);
  Wa[0].read();
  Wa[1].read();
  if (Wa[0].x > Wa[1].x) swap(Wa[0], Wa[1]);
  Mi[0].read();
  Mi[1].read();
  if (Mi[0].x > Mi[1].x) swap(Mi[0], Mi[1]);
}
bool XJ1(Point A, Point B, Point C, Point D) {
  double c1 = Cross(B - A, C - A), c2 = Cross(B - A, D - A),
         c3 = Cross(D - C, A - C), c4 = Cross(D - C, B - C);
  return dcmp(c1) * dcmp(c2) < 0 && dcmp(c3) * dcmp(c4) < 0;
}
bool XJ2(Point P, Point A, Point B) {
  return dcmp(Cross(A - P, B - P)) == 0 && dcmp(Dot(A - P, B - P)) < 0;
}
Point JD(Point P, Point v, Point Q, Point w) {
  Point u = P - Q;
  double t = Cross(w, u) / Cross(v, w);
  return P + v * t;
}
void solve() {
  if (XJ1(S, T, Mi[0], Mi[1]) || (XJ2(Mi[0], S, T) ^ XJ2(Mi[1], S, T))) {
    printf("NO\n");
    return;
  }
  if (!XJ1(S, T, Wa[0], Wa[1]) && !XJ2(Wa[0], S, T) && !XJ2(Wa[1], S, T)) {
    printf("YES\n");
    return;
  }
  if (dcmp(Cross(S - Mi[0], Mi[1] - Mi[0])) *
          dcmp(Cross(T - Mi[0], Mi[1] - Mi[0])) <
      0) {
    printf("NO\n");
    return;
  }
  if (dcmp(Cross(T - S, Mi[1] - Mi[0])) == 0 &&
      dcmp(Cross(T - S, Mi[0] - S)) == 0) {
    printf("NO\n");
    return;
  }
  Point v = Mi[1] - Mi[0], w = Rotate(v, PI / 2);
  Point P = JD(T, w, Mi[0], v);
  P = P + (P - T);
  M = JD(S, P - S, Mi[0], v);
  if (dcmp(Dot(Mi[0] - M, Mi[1] - M)) > 0) {
    printf("NO\n");
    return;
  }
  if (XJ1(S, M, Wa[0], Wa[1]) || XJ2(Wa[0], S, M) || XJ2(Wa[1], S, M)) {
    printf("NO\n");
    return;
  }
  if (XJ1(M, T, Wa[0], Wa[1]) || XJ2(Wa[0], M, T) || XJ2(Wa[1], M, T)) {
    printf("NO\n");
    return;
  }
  printf("YES\n");
}
int main() {
  init();
  solve();
  return 0;
}
