#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, k, l, o, p;
const double zero = 1e-5;
struct data {
  double x, y;
} a[2], jz[2], qia[2];
data b, c;
bool flag, flag1, flag2;
struct data1 {
  double a, b, c;
} xl1, xl2, xl3;
double xc(data a, data b, data c) {
  return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
}
data jd(data a1, data a2, data b1, data b2) {
  double d, d1, d2;
  data tmp;
  d1 = xc(b1, a2, a1);
  d2 = xc(a2, b2, a1);
  d = d1 + d2;
  if (fabs(d) < zero) d = zero;
  tmp.x = (b1.x * d2 + b2.x * d1) / d;
  tmp.y = (b1.y * d2 + b2.y * d1) / d;
  return tmp;
}
int pd(data a, data b, data c) {
  double o, p;
  if (fabs(xc(a, b, c)) < zero) {
    o = min(b.x, c.x);
    p = max(b.x, c.x);
    if (!(a.x <= p && a.x >= o)) return 0;
    o = min(b.y, c.y);
    p = max(b.y, c.y);
    if (a.y <= p && a.y >= o)
      return 1;
    else
      return 0;
  } else
    return 0;
}
data1 xl(data a, data b) {
  data1 ans;
  if (a.x == b.x) {
    ans.a = 1;
    ans.b = 0;
    ans.c = -a.x;
    return ans;
  }
  ans.a = (a.y - b.y);
  ans.b = -(a.x - b.x);
  ans.c = a.y * (a.x - b.x) - (a.y - b.y) * a.x;
  return ans;
}
bool px(data a, data b, data c, data d) {
  a.x = b.x - a.x;
  a.y = b.y - a.y;
  c.x = d.x - c.x;
  c.y = d.y - c.y;
  if (fabs(a.x * c.y - a.y * c.x) < zero)
    return true;
  else
    return false;
}
data dc(data a, data1 b) {
  data ans;
  ans.x =
      ((b.b * b.b - b.a * b.a) * a.x - 2 * b.a * b.b * a.y - 2 * b.a * b.c) /
      (b.a * b.a + b.b * b.b);
  ans.y =
      ((b.a * b.a - b.b * b.b) * a.y - 2 * b.a * b.b * a.x - 2 * b.b * b.c) /
      (b.a * b.a + b.b * b.b);
  return ans;
}
int main() {
  for (i = 0; i < 2; i++) cin >> a[i].x >> a[i].y;
  for (i = 0; i < 2; i++) cin >> qia[i].x >> qia[i].y;
  for (i = 0; i < 2; i++) cin >> jz[i].x >> jz[i].y;
  if (px(a[0], a[1], qia[0], qia[1])) {
    if (pd(a[0], qia[0], qia[1]) || pd(a[1], qia[0], qia[1]) ||
        pd(qia[0], a[0], a[1]) || pd(qia[1], a[0], a[1]))
      flag = true;
    else
      flag = false;
  } else {
    b = jd(a[0], a[1], qia[0], qia[1]);
    flag = (pd(b, qia[0], qia[1])) && (pd(b, a[0], a[1]));
  }
  if (px(a[0], a[1], jz[0], jz[1])) {
    flag1 = false;
    flag2 = false;
  } else {
    b = jd(a[0], a[1], jz[0], jz[1]);
    flag1 = pd(b, jz[0], jz[1]);
    flag2 = pd(b, a[0], a[1]);
  }
  if (!flag && (!flag1 || !flag2)) {
    printf("YES\n");
    return 0;
  }
  if (flag2) {
    printf("NO\n");
    return 0;
  }
  xl1 = xl(jz[0], jz[1]);
  b = dc(a[1], xl1);
  c = jd(b, a[0], jz[0], jz[1]);
  if (!pd(c, jz[0], jz[1])) {
    printf("NO\n");
    return 0;
  }
  if (px(a[0], c, qia[0], qia[1])) {
    if (pd(a[0], qia[0], qia[1]) || pd(c, qia[0], qia[1]) ||
        pd(qia[0], a[0], c) || pd(qia[1], a[0], c))
      flag = false;
    else
      flag = true;
  } else {
    b = jd(a[0], c, qia[0], qia[1]);
    if (pd(b, qia[0], qia[1]) == 1 && pd(b, a[0], c) == 1) {
      flag = false;
    } else
      flag = true;
  }
  if (px(a[1], c, qia[0], qia[1])) {
    if (pd(a[1], qia[0], qia[1]) == 1 || pd(c, qia[0], qia[1]) == 1 ||
        pd(qia[0], a[1], c) == 1 || pd(qia[1], a[1], c) == 1)
      flag1 = false;
    else
      flag1 = true;
  } else {
    b = jd(a[1], c, qia[0], qia[1]);
    if (pd(b, qia[0], qia[1]) == 1 && pd(b, a[1], c) == 1) {
      flag1 = false;
    } else
      flag1 = true;
  }
  if (flag && flag1)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
