#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
struct point {
  double x, y;
};
point operator+(point a, point b) { return (point){a.x + b.x, a.y + b.y}; }
point operator-(point a, point b) { return (point){a.x - b.x, a.y - b.y}; }
double operator*(point a, point b) { return a.x * b.x + a.y * b.y; }
double operator/(point a, point b) { return a.x * b.y - a.y * b.x; }
point operator*(point a, double b) { return (point){a.x * b, a.y * b}; }
point operator/(point a, double b) { return (point){a.x / b, a.y / b}; }
double dis(point A) { return sqrt(A.x * A.x + A.y * A.y); }
int get0(point A, point B, point C, point D) {
  return min(A.x, B.x) < max(C.x, D.x) && min(C.x, D.x) < max(A.x, B.x) &&
         min(A.y, B.y) < max(C.y, D.y) && min(C.y, D.y) < max(A.y, B.y) &&
         ((C - A) / (B - A)) * ((B - A) / (D - A)) > eps &&
         ((A - C) / (D - C)) * ((D - C) / (B - C)) > eps;
}
int get1(point A, point B, point C, point D) {
  return min(A.x, B.x) <= max(C.x, D.x) && min(C.x, D.x) <= max(A.x, B.x) &&
         min(A.y, B.y) <= max(C.y, D.y) && min(C.y, D.y) <= max(A.y, B.y) &&
         ((C - A) / (B - A)) * ((B - A) / (D - A)) >= -eps &&
         ((A - C) / (D - C)) * ((D - C) / (B - C)) >= -eps;
}
int line(point A, point B, point C, point D) {
  return fabs((A - C) / (C - D)) <= eps && fabs((C - D) / (D - B)) <= eps;
}
point turn(point A, point B) {
  return (point){A.x * B.x - A.y * B.y, A.x * B.y + A.y * B.x};
}
point mirror(point A, point B, point C) {
  point BA, BC, angle;
  double cossita, sinsita;
  BA = A - B;
  BC = C - B;
  cossita = BA * BC / dis(BA) / dis(BC);
  sinsita = sqrt(1 - cossita * cossita);
  if (BA / BC < 0) cossita = -cossita;
  angle = (point){cossita, sinsita};
  BA = turn(BA, angle);
  BA = turn(BA, angle);
  return B + BA;
}
int main() {
  point A, B, C, D, E, F, G, _A, _B;
  scanf("%lf%lf", &A.x, &A.y);
  scanf("%lf%lf", &B.x, &B.y);
  scanf("%lf%lf", &C.x, &C.y);
  scanf("%lf%lf", &D.x, &D.y);
  scanf("%lf%lf", &E.x, &E.y);
  scanf("%lf%lf", &F.x, &F.y);
  if (!get1(A, B, C, D)) {
    if (!get1(A, B, E, F) || line(A, B, E, F))
      printf("YES\n");
    else
      printf("NO\n");
  } else {
    if (line(A, B, E, F))
      printf("NO\n");
    else {
      _A = mirror(A, E, F);
      _B = mirror(B, E, F);
      G = A + (_B - A) * (dis(_A - A) / (dis(_A - A) + dis(_B - B)));
      if (get1(A, _B, E, F) && get1(_A, B, E, F))
        if (!get1(A, G, C, D) && !get1(B, G, C, D))
          printf("YES\n");
        else
          printf("NO\n");
      else
        printf("NO\n");
    }
  }
  return 0;
}
