#include <bits/stdc++.h>
const double eps = 1e-8;
struct P {
  double x, y;
  P(double x = 0, double y = 0) : x(x), y(y){};
} u, v, w1, w2, m1, m2, p;
P operator+(P a, P b) { return P(a.x + b.x, a.y + b.y); }
P operator-(P a, P b) { return P(a.x - b.x, a.y - b.y); }
P operator~(P a) { return P(-a.y, a.x); }
inline int sgn(double x) { return x < -eps ? -1 : x > eps; }
inline double dis(P a, P b) {
  return sqrt(((a.x - b.x) * (a.x - b.x)) + ((a.y - b.y) * (a.y - b.y)));
}
inline void read(P &a) { scanf("%lf%lf", &a.x, &a.y); }
inline double det(P a, P b, P c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
inline bool line(P a, P b, P c) {
  return !sgn(dis(a, b) + dis(b, c) - dis(a, c));
}
inline P rev(P a, P b) { return P(b.x * 2 - a.x, b.y * 2 - a.y); }
inline P Point(P a, P b, P c, P d) {
  double s1 = det(a, c, b), s2 = det(a, b, d);
  return P((c.x * s2 + d.x * s1) / (s1 + s2),
           (c.y * s2 + d.y * s1) / (s1 + s2));
}
inline bool cross(P a, P b, P c, P d, int opt) {
  if (opt && line(a, c, b) && line(a, d, b)) return 0;
  if (line(a, c, b) || line(a, d, b) || line(c, a, d) || line(c, b, d))
    return 1;
  return det(a, c, b) * det(a, b, d) > eps && det(c, a, d) * det(c, d, b) > eps;
}
int main() {
  read(u);
  read(v);
  read(w1);
  read(w2);
  read(m1);
  read(m2);
  if (!cross(u, v, w1, w2, 0) && !cross(u, v, m1, m2, 1))
    printf("YES");
  else {
    p = Point(m1, m2, u, u + ~(m1 - m2));
    p = rev(u, p);
    if (cross(p, v, m1, m2, 0)) {
      p = Point(p, v, m1, m2);
      if (cross(u, p, w1, w2, 0) || cross(p, v, w1, w2, 0))
        printf("NO");
      else
        printf("YES");
    } else
      printf("NO");
  }
  return 0;
}
