#include <bits/stdc++.h>
using namespace std;
double ERR = 1e-8;
void print(pair<double, double> pt) {
  printf("%.3f, %.3f\n", pt.first, pt.second);
}
pair<double, double> diff(pair<double, double> a, pair<double, double> b) {
  pair<double, double> res;
  res.first = a.first - b.first;
  res.second = a.second - b.second;
  return res;
}
pair<double, double> add(pair<double, double> a, pair<double, double> b) {
  pair<double, double> res;
  res.first = a.first + b.first;
  res.second = a.second + b.second;
  return res;
}
double det(pair<double, double> a, pair<double, double> b) {
  return a.first * b.second - a.second * b.first;
}
int getSide(pair<double, double> a, pair<double, double> b,
            pair<double, double> c) {
  double res = det(diff(a, b), diff(c, b));
  if (res < -ERR)
    return -1;
  else if (res > ERR)
    return 1;
  return 0;
}
int intersect(pair<double, double> a, pair<double, double> b,
              pair<double, double> c, pair<double, double> d) {
  int acd = getSide(c, d, a);
  int bcd = getSide(c, d, b);
  int cab = getSide(a, b, c);
  int dab = getSide(a, b, d);
  if (acd * bcd == 1 || cab * dab == 1) return 1;
  if (acd * bcd == -1 && cab * dab == -1) return 2;
  if (acd == 0 && bcd == 0 && cab == 0 && dab == 0) {
    double x1 = a.first;
    double x2 = b.first;
    if (x1 > x2) {
      double temp = x1;
      x1 = x2;
      x2 = temp;
    }
    double x3 = c.first;
    double x4 = d.first;
    if (x3 > x4) {
      double temp = x3;
      x3 = x4;
      x4 = temp;
    }
    if (x2 < x3 || x4 < x1) return 1;
    return 3;
  }
  return 4;
}
pair<double, double> intersection(pair<double, double> a,
                                  pair<double, double> b,
                                  pair<double, double> c,
                                  pair<double, double> d) {
  double m1 = (b.second - a.second) / (b.first - a.first);
  double m2 = (d.second - c.second) / (d.first - c.first);
  double ansx = (m1 * a.first - m2 * c.first - a.second + c.second) / (m1 - m2);
  double ansy = a.second + m1 * (ansx - a.first);
  return pair<double, double>(ansx, ansy);
}
double norm(pair<double, double> a) {
  return sqrt((a.first * a.first) + (a.second * a.second));
}
pair<double, double> normalize(pair<double, double> a) {
  pair<double, double> ans;
  ans.first = a.first / norm(a);
  ans.second = a.second / norm(a);
  return ans;
}
double innerp(pair<double, double> a, pair<double, double> b) {
  return a.first * b.first + a.second * b.second;
}
pair<double, double> multiply(pair<double, double> a, double k) {
  pair<double, double> ans;
  ans.first = a.first * k;
  ans.second = a.second * k;
  return ans;
}
pair<double, double> reflect(pair<double, double> a, pair<double, double> b,
                             pair<double, double> c) {
  pair<double, double> v1 = diff(b, a);
  pair<double, double> v2 = diff(c, a);
  v1 = normalize(v1);
  double ip = innerp(v1, v2);
  pair<double, double> proj = multiply(v1, ip);
  pair<double, double> perp = diff(v2, proj);
  pair<double, double> ans = diff(v2, multiply(perp, 2));
  ans = add(ans, a);
  return ans;
}
pair<double, double> rotate(pair<double, double> pt) {
  double theta = 0.001234;
  pair<double, double> ans;
  ans.first = cos(theta) * pt.first + sin(theta) * pt.second;
  ans.second = -sin(theta) * pt.first + cos(theta) * pt.second;
  return ans;
}
pair<double, double> readPt() {
  int a, b;
  scanf("%d %d", &a, &b);
  pair<double, double> ans;
  ans.first = a;
  ans.second = b;
  return ans;
}
pair<double, double> p1;
pair<double, double> p2;
pair<double, double> w1, w2;
pair<double, double> m1, m2;
int main() {
  p1 = readPt();
  p2 = readPt();
  w1 = readPt();
  w2 = readPt();
  m1 = readPt();
  m2 = readPt();
  p1 = rotate(p1);
  p2 = rotate(p2);
  w1 = rotate(w1);
  w2 = rotate(w2);
  m1 = rotate(m1);
  m2 = rotate(m2);
  int int1 = intersect(p1, p2, w1, w2);
  int int2 = intersect(p1, p2, m1, m2);
  if (int1 == 1 && (int2 == 1 || int2 == 3)) {
    printf("YES\n");
    return 0;
  }
  if (getSide(m1, m2, p1) * getSide(m1, m2, p2) != 1) {
    printf("NO\n");
    return 0;
  }
  pair<double, double> ref2 = reflect(m1, m2, p2);
  if (getSide(p1, ref2, m1) * getSide(p1, ref2, m2) == 1) {
    printf("NO\n");
    return 0;
  }
  pair<double, double> ipt = intersection(m1, m2, p1, ref2);
  int int3 = intersect(p1, ipt, w1, w2);
  int int4 = intersect(ipt, p2, w1, w2);
  if (int3 == 1 && int4 == 1) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
