#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
};
int sign(double x) {
  if (x > 1.0E-9) return 1;
  if (x < -1.0E-9) return -1;
  return 0;
}
double area(point P, point Q, point R) {
  return ((Q.x - P.x) * (R.y - P.y) - (Q.y - P.y) * (R.x - P.x)) / 2.0;
}
double inprod(point O, point P, point Q) {
  return (P.x - O.x) * (Q.x - O.x) + (P.y - O.y) * (Q.y - O.y);
}
point foot(point P, point A, point B) {
  double t = inprod(A, B, P) / inprod(A, B, B);
  point ans = {A.x + (B.x - A.x) * t, A.y + (B.y - A.y) * t};
  return ans;
}
bool sscross(point p1, point p2, point p3, point p4) {
  if (sign(area(p1, p2, p3)) * sign(area(p1, p2, p4)) == 1) return false;
  if (sign(area(p3, p4, p1)) * sign(area(p3, p4, p2)) == 1) return false;
  if (max(p1.x, p2.x) < min(p3.x, p4.x) - 1.0E-9) return false;
  if (max(p1.y, p2.y) < min(p3.y, p4.y) - 1.0E-9) return false;
  if (max(p3.x, p4.x) < min(p1.x, p2.x) - 1.0E-9) return false;
  if (max(p3.y, p4.y) < min(p1.y, p2.y) - 1.0E-9) return false;
  return true;
}
point cross(point A, point B, point C, point D) {
  double a = -A.y + B.y, b = A.x - B.x, c = A.x * B.y - A.y * B.x,
         d = -C.y + D.y, e = C.x - D.x, f = C.x * D.y - C.y * D.x;
  point ans = {(c * e - b * f) / (a * e - b * d),
               (c * d - a * f) / (b * d - a * e)};
  return ans;
}
bool linear(point P, point Q, point R) {
  double tmp = area(P, Q, R);
  return (tmp > -1.0E-9 && tmp < 1.0E-9);
}
void print(point P) { cout << P.x << ' ' << P.y << endl; }
bool func(point P, point Q, point W1, point W2, point M1, point M2) {
  if (!sscross(P, Q, W1, W2)) {
    if (!sscross(P, Q, M1, M2)) return true;
    if (linear(P, Q, M1) && linear(P, Q, M2)) return true;
  }
  if (sign(area(M1, M2, P)) * sign(area(M1, M2, Q)) == 1) {
    point R = foot(Q, M1, M2);
    point S = {2.0 * R.x - Q.x, 2.0 * R.y - Q.y};
    if (sscross(P, S, M1, M2)) {
      point T = cross(P, S, M1, M2);
      if (!sscross(P, T, W1, W2) && !sscross(Q, T, W1, W2)) return true;
    }
  }
  return false;
}
point read(void) {
  double x, y;
  cin >> x >> y;
  point P = {x, y};
  return P;
}
int main(void) {
  point P = read(), Q = read(), W1 = read(), W2 = read(), M1 = read(),
        M2 = read();
  cout << (func(P, Q, W1, W2, M1, M2) ? "YES" : "NO") << endl;
  return 0;
}
