#include <bits/stdc++.h>
using namespace std;
long double eps = 1e-10;
struct point {
  long double x, y;
  point() {}
  point(double x, double y) : x(x), y(y) {}
  bool operator<(point p) {
    return x < p.x - eps || (x < p.x + eps && y < p.y - eps);
  }
  bool operator<=(point p) {
    return x < p.x - eps || (x < p.x + eps && y < p.y + eps);
  }
  point operator-(const point &p) const { return point(x - p.x, y - p.y); }
  double operator*(const point &p) const { return x * p.y - y * p.x; }
} a, b, wa, ma, wb, mb;
int sg(long double x) { return x < -eps ? -1 : x > eps ? 1 : 0; }
bool inter(point a, point b, point c, point d) {
  if (fabs((b - a) * (c - a)) < eps && fabs((b - a) * (d - a)) < eps) {
    if (!(a < b)) swap(a, b);
    if (!(c < d)) swap(c, d);
    point l = a;
    if (l < c) l = c;
    point r = d;
    if (b < r) r = b;
    return l <= r;
  }
  return sg((b - a) * (c - a)) * sg((b - a) * (d - a)) <= 0 &&
         sg((c - d) * (a - d)) * sg((c - d) * (b - d)) <= 0;
}
int main() {
  cin >> a.x >> a.y >> b.x >> b.y >> wa.x >> wa.y >> wb.x >> wb.y >> ma.x >>
      ma.y >> mb.x >> mb.y;
  if (!(wa < wb)) swap(wa, wb);
  if (!(ma < mb)) swap(ma, mb);
  long double A = ma.y - mb.y, B = mb.x - ma.x,
              C = (-1) * (A * ma.x + B * ma.y);
  int sga = sg(A * a.x + B * a.y + C), sgb = sg(A * b.x + B * b.y + C);
  if (!inter(a, b, wa, wb) && sga * sgb >= 0) {
    cout << "YES";
    return 0;
  }
  if (!inter(a, b, wa, wb) && !inter(a, b, ma, mb)) {
    cout << "YES";
    return 0;
  }
  if (sga * sgb == 1) {
    long double d = (A * a.x + B * a.y + C) / (A * A + B * B);
    point p(a.x - 2 * A * d, a.y - 2 * B * d);
    long double A1 = p.y - b.y, B1 = b.x - p.x,
                C1 = (-1) * (A1 * p.x + B1 * p.y);
    long double x = B * C1 - B1 * C, y = C * A1 - A * C1, z = A * B1 - A1 * B;
    if (fabs(z) > eps) {
      x /= z;
      y /= z;
      point p(x, y);
      if (ma <= p && p <= mb) {
        if (!inter(a, p, wa, wb) && !inter(b, p, wa, wb)) {
          cout << "YES";
          return 0;
        }
      }
    }
  }
  cout << "NO";
  return 0;
}
