#include <bits/stdc++.h>
using namespace std;
struct Tpoint {
  double x, y;
  Tpoint() {}
  Tpoint(double x1, double y1) {
    x = x1;
    y = y1;
  }
  void read() { scanf("%lf%lf", &x, &y); }
  Tpoint operator+(const Tpoint &a) { return Tpoint(x + a.x, y + a.y); }
  Tpoint operator-(const Tpoint &a) { return Tpoint(x - a.x, y - a.y); }
  Tpoint operator*(double k) { return Tpoint(x * k, y * k); }
  Tpoint operator/(double k) { return Tpoint(x / k, y / k); }
  double operator*(const Tpoint &a) { return x * a.x + y * a.y; }
  double operator%(const Tpoint &a) { return x * a.y - y * a.x; }
  double dis() { return sqrt(x * x + y * y); }
} V, P, Ws, Wt, Ms, Mt;
struct Tprogram {
  void open() {
    freopen("1.in", "r", stdin);
    freopen("1.out", "w", stdout);
  }
  void close() {}
  void init() {
    V.read();
    P.read();
    Ws.read();
    Wt.read();
    Ms.read();
    Mt.read();
  }
  bool in(Tpoint &a, Tpoint &b, Tpoint &c) {
    if ((a - c) * (b - c) >= -1e-6 && (a - b) * (c - b) >= -1e-6) return 1;
    return 0;
  }
  Tpoint Jiao(Tpoint &a, Tpoint &b, Tpoint &c, Tpoint &d, bool t) {
    double s1 = (c - a) % (b - a), s2 = (d - a) % (a - b);
    if (fabs(s1 + s2) < 1e-6) {
      if (!t || fabs(s1) > 1e-6 || fabs(s2) > 1e-6) return Tpoint(1e9, 0);
      if (in(a, c, d)) return a;
      if (in(b, c, d)) return b;
      if (in(c, a, b)) return c;
      if (in(d, a, b)) return d;
      return Tpoint(1e9, 0);
    }
    Tpoint g = (c * s2 + d * s1) / (s1 + s2);
    if (in(g, a, b) && in(g, c, d)) return g;
    return Tpoint(1e9, 0);
  }
  int Check(Tpoint &a, Tpoint &b) {
    int cnt = 0;
    Tpoint g = Jiao(a, b, Ws, Wt, 1);
    if (g.x < 1e9) cnt += 2;
    g = Jiao(a, b, Ms, Mt, 0);
    if (g.x < 1e9) cnt++;
    return cnt;
  }
  Tpoint chen(Tpoint &a, Tpoint &b, Tpoint &c) {
    Tpoint g = b - c;
    g = g / g.dis();
    Tpoint d = b + g * (g * (a - b));
    return d * 2 - a;
  }
  void work() {
    int t = Check(V, P);
    if (t & 1)
      printf("NO\n");
    else if (!t)
      printf("YES\n");
    else {
      double s1 = (V - Ms) % (Ms - Mt), s2 = (P - Ms) % (Ms - Mt);
      if (s1 * s2 < -1e-6) return printf("NO\n"), void();
      if (fabs(s1) < 1e-6 && fabs(s2) < 1e-6) return printf("NO\n"), void();
      Tpoint V1 = chen(V, Ms, Mt);
      Tpoint g = Jiao(V1, P, Ms, Mt, 1);
      if (Check(g, P) == 1 && Check(g, V) == 1)
        printf("YES\n");
      else
        printf("NO\n");
    }
  }
} Program;
int main() {
  Program.init();
  Program.work();
  return 0;
}
