#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7, pi = 3.1415926535897932384626433832795;
struct point {
  double x, y;
  void IN() { scanf("%lf%lf", &x, &y); }
  point(double a = 0, double b = 0) : x(a), y(b) {}
  point operator+(const point &a) const { return point(x + a.x, y + a.y); }
  point operator-(const point &a) const { return point(x - a.x, y - a.y); }
  point operator*(const double &k) const { return point(x * k, y * k); }
  point operator/(const double &k) const { return point(x / k, y / k); }
  double operator*(const point &a) const { return x * a.x + y * a.y; }
  point rot(const double &k) {
    return point(x * cos(k) - y * sin(k), x * sin(k) + y * cos(k));
  }
} v, p, v1, p1, w1, w2, m1, m2;
double area(const point &a, const point &b) { return a.x * b.y - a.y * b.x; }
point cross(const point &a, const point &b, const point &c, const point &d) {
  double s1 = area(b - a, c - a), s2 = area(b - a, d - a);
  return (c * s2 - d * s1) / (s2 - s1);
}
bool in_line(const point &a, const point &b, const point &c) {
  return abs(area(b - a, c - a)) < eps && (b - a) * (c - a) > -eps &&
         (a - b) * (c - b) > -eps;
}
bool check(const point &a, const point &b, const point &c, const point &d,
           bool flag) {
  double s1 = area(b - a, c - a), s2 = area(b - a, d - a);
  if (!flag && in_line(a, b, c) || in_line(a, b, d) || in_line(c, d, a) ||
      in_line(c, d, b))
    return 1;
  if (abs(s1 - s2) < eps) return 0;
  point e = (c * s2 - d * s1) / (s2 - s1);
  return in_line(a, b, e) && in_line(c, d, e);
}
point opp(const point &a, const point &b, const point &c) {
  point d = cross(a, ((c - b).rot(pi / 2)) + a, b, c);
  return d + d - a;
}
int main() {
  v.IN(), p.IN(), w1.IN(), w2.IN(), m1.IN(), m2.IN();
  if (!check(v, p, w1, w2, 0) && !check(v, p, m1, m2, 1)) return puts("YES"), 0;
  v1 = opp(v, m1, m2), p1 = opp(p, m1, m2);
  if (!check(v1, p, w1, w2, 0) && !check(v, p1, w1, w2, 0) &&
      check(v1, p, m1, m2, 0))
    puts("YES");
  else
    puts("NO");
}
