#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10;
const double Pi = 3.1415926535897932385;
struct Tpoint {
  double x, y;
  Tpoint() {}
  Tpoint(double _x, double _y) {
    x = _x;
    y = _y;
  }
  Tpoint operator+(Tpoint b) { return Tpoint(x + b.x, y + b.y); }
  Tpoint operator-(Tpoint b) { return Tpoint(x - b.x, y - b.y); }
};
double Fabs(double x) { return x < 0 ? -x : x; }
double Cross(Tpoint p0, Tpoint p1, Tpoint p2) {
  return (p1.x - p0.x) * (p2.y - p0.y) - (p2.x - p0.x) * (p1.y - p0.y);
}
double dist(Tpoint a, Tpoint b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
double Inline(Tpoint p0, Tpoint p1, Tpoint t) {
  return Fabs(dist(p0, t) + dist(p1, t) - dist(p1, p0)) < eps;
}
int sgn(double x) {
  if (Fabs(x) < eps) return 0;
  return x < 0 ? -1 : 1;
}
bool Connect(Tpoint a, Tpoint b, Tpoint c, Tpoint d, int type) {
  if (!type) {
    if (Inline(a, b, c) && Inline(a, b, d)) return 0;
  }
  if (Inline(a, b, c) || Inline(a, b, d) || Inline(c, d, a) || Inline(c, d, b))
    return 1;
  return sgn(Cross(a, b, c)) != sgn(Cross(a, b, d)) &&
         sgn(Cross(c, d, a)) != sgn(Cross(c, d, b));
}
Tpoint InterPt(Tpoint a, Tpoint b, Tpoint c, Tpoint d) {
  double s1 = Cross(a, c, b), s2 = Cross(a, b, d);
  return Tpoint((c.x * s2 + d.x * s1) / (s1 + s2),
                (c.y * s2 + d.y * s1) / (s1 + s2));
}
Tpoint OppPt(Tpoint p0, Tpoint p1, Tpoint t) {
  Tpoint det = p1 - p0;
  double alpha = Pi / 2;
  det = Tpoint(det.x * cos(alpha) - det.y * sin(alpha),
               det.x * sin(alpha) + det.y * cos(alpha));
  Tpoint mid = InterPt(p0, p1, t, t + det);
  return mid + mid - t;
}
Tpoint w0, w1, m0, m1;
Tpoint v, p, q;
void init() {
  cin >> v.x >> v.y >> p.x >> p.y >> w0.x >> w0.y >> w1.x >> w1.y >> m0.x >>
      m0.y >> m1.x >> m1.y;
}
void print() {
  if (!Connect(v, p, w0, w1, 1) && !Connect(v, p, m0, m1, 0)) {
    printf("YES\n");
    return;
  }
  q = OppPt(m0, m1, p);
  if (Connect(v, q, m0, m1, 0)) {
    Tpoint mid = InterPt(v, q, m0, m1);
    if (!Connect(p, mid, w0, w1, 1) && !Connect(mid, v, w0, w1, 1)) {
      printf("YES\n");
      return;
    }
  }
  printf("NO\n");
}
int main() {
  init();
  print();
  return 0;
}
