#include <bits/stdc++.h>
using namespace std;
class Point {
 public:
  double x, y;
  Point() {
    x = 0.;
    y = 0.;
  }
  Point(double xx, double yy) {
    x = xx;
    y = yy;
  }
};
int cmp(double a, double b) {
  if (a < b - 0.000001) return -1;
  if (a <= b + 0.000001) return 0;
  return 1;
}
int side(double sx, double sy, double ex, double ey, double pointx,
         double pointy) {
  double dx, dy;
  double px, py;
  double t;
  dx = ex - sx;
  dy = ey - sy;
  px = pointx - sx;
  py = pointy - sy;
  t = dx * py - dy * px;
  if (t > 0.000001) return 0;
  if (t < -0.0000001) return 1;
  return 2;
}
int between(double sx, double sy, double ex, double ey, double px, double py) {
  if (cmp(sx, ex) == 0) {
    if (cmp(sy, ey) < 0) {
      return cmp(sy, py) <= 0 && cmp(py, ey) <= 0;
    } else {
      return cmp(ey, py) <= 0 && cmp(py, sy) <= 0;
    }
  } else {
    if (cmp(sx, ex) < 0) {
      return cmp(sx, px) <= 0 && cmp(px, ex) <= 0;
    } else {
      return cmp(ex, px) <= 0 && cmp(px, sx) <= 0;
    }
  }
}
int check_intersect(Point p1, Point p2, Point q1, Point q2) {
  double sx, sy;
  double ex, ey;
  sx = p1.x;
  sy = p1.y;
  ex = p2.x;
  ey = p2.y;
  int s1 = side(sx, sy, ex, ey, q1.x, q1.y);
  int s2 = side(sx, sy, ex, ey, q2.x, q2.y);
  if (s1 == 2 && between(sx, sy, ex, ey, q1.x, q1.y)) return 1;
  if (s2 == 2 && between(sx, sy, ex, ey, q2.x, q2.y)) return 1;
  if (s1 == s2) return 0;
  sx = q1.x;
  sy = q1.y;
  ex = q2.x;
  ey = q2.y;
  s1 = side(sx, sy, ex, ey, p1.x, p1.y);
  s2 = side(sx, sy, ex, ey, p2.x, p2.y);
  if (s1 == 2 && between(sx, sy, ex, ey, p1.x, p1.y)) return 1;
  if (s2 == 2 && between(sx, sy, ex, ey, p2.x, p2.y)) return 1;
  if (s1 == s2) return 0;
  return 1;
}
const double EPS = 1e-9;
class Line {
 public:
  double a, b, c;
  Line() : a(0), b(0), c(0) {}
  Line(double aa, double bb, double cc) : a(aa), b(bb), c(cc) {}
};
Point intersection(Point p1, Point p2, Point q1, Point q2) {
  Point result(0, 0);
  double a = p2.x - p1.x;
  double b = p2.y - p1.y;
  double c = q1.x - p1.x;
  double d = q1.y - p1.y;
  double e = q2.x - p1.x;
  double f = q2.y - p1.y;
  double den = b * (e - c) - a * (f - d);
  if (cmp(den, 0) == 0) {
    return result;
  }
  double num = a * d * (e - c) - a * (f - d) * c;
  double x = num / den;
  double y = x * b / a;
  result.x = x + p1.x;
  result.y = y + p1.y;
  return result;
}
Point reflect(Point p, Point q1, Point q2) {
  double a = q2.x - q1.x;
  double b = q2.y - q1.y;
  double c = p.x - q1.x;
  double d = p.y - q1.y;
  double den = a * a + b * b;
  double x = a * a * c + 2 * a * b * d - b * b * c;
  x /= den;
  double y = b * b * d + 2 * a * b * c - a * a * d;
  y /= den;
  return Point(x + q1.x, y + q1.y);
}
int can_see(Point V, Point P, Point M1, Point M2, Point W1, Point W2) {
  int vs = side(M1.x, M1.y, M2.x, M2.y, V.x, V.y);
  int ps = side(M1.x, M1.y, M2.x, M2.y, P.x, P.y);
  int iw = check_intersect(V, P, W1, W2);
  if (vs == 2 || ps == 2) {
    return !iw;
  } else if (vs != ps) {
    int mw = check_intersect(V, P, M1, M2);
    return !iw && !mw;
  } else {
    if (!iw) return 1;
    Point P2 = reflect(P, M1, M2);
    if (!check_intersect(V, P2, M1, M2)) return 0;
    Point R = intersection(V, P2, M1, M2);
    int i1 = check_intersect(V, R, W1, W2);
    int i2 = check_intersect(R, P, W1, W2);
    return !i1 && !i2;
  }
}
int main(void) {
  Point V, P, M1, M2, W1, W2;
  int x, y;
  cin >> x >> y;
  V = Point(x, y);
  cin >> x >> y;
  P = Point(x, y);
  cin >> x >> y;
  W1 = Point(x, y);
  cin >> x >> y;
  W2 = Point(x, y);
  cin >> x >> y;
  M1 = Point(x, y);
  cin >> x >> y;
  M2 = Point(x, y);
  if (can_see(V, P, M1, M2, W1, W2)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
