#include <bits/stdc++.h>
using namespace std;
double det(double a, double b, double c, double d) { return a * d - b * c; }
class line {
 private:
  std::pair<double, double> p, q;

 public:
  double a, b, c;
  line(double xa, double ya, double xb, double yb);
  line(double aa, double bb, double cc) {
    a = aa;
    b = bb;
    c = cc;
  }
  bool haveCommonPoint(line n);
  bool inLine(std::pair<double, double> common);
  std::pair<double, double> getPoint(line n);
};
line ::line(double xa, double ya, double xb, double yb) {
  p.first = xa;
  p.second = ya;
  q.first = xb;
  q.second = yb;
  a = ya - yb;
  b = xb - xa;
  c = (yb - ya) * xa - (xb - xa) * ya;
}
bool line ::haveCommonPoint(line n) {
  std::pair<double, double> temp;
  if (det(a, b, n.a, n.b) != 0.0) {
    temp.first = det(b, c, n.b, n.c) / det(a, b, n.a, n.b);
    temp.second = det(c, a, n.c, n.a) / det(a, b, n.a, n.b);
    if (inLine(temp) && n.inLine(temp)) return true;
  }
  return false;
}
bool line ::inLine(std::pair<double, double> common) {
  if (common.first <= max(p.first, q.first) &&
      common.first >= min(p.first, q.first) &&
      common.second <= max(p.second, q.second) &&
      common.second >= min(p.second, q.second))
    return true;
  return false;
}
std::pair<double, double> line ::getPoint(line n) {
  std::pair<double, double> temp;
  if (det(a, b, n.a, n.b) != 0.0) {
    temp.first = det(b, c, n.b, n.c) / det(a, b, n.a, n.b);
    temp.second = det(c, a, n.c, n.a) / det(a, b, n.a, n.b);
  }
  return temp;
}
int main() {
  int xv, yv, xp, yp, xw1, yw1, xw2, yw2, xm1, ym1, xm2, ym2;
  cin >> xv >> yv >> xp >> yp >> xw1 >> yw1 >> xw2 >> yw2 >> xm1 >> ym1 >>
      xm2 >> ym2;
  line pv(xp, yp, xv, yv), m(xm1, ym1, xm2, ym2), w(xw1, yw1, xw2, yw2);
  bool h = false;
  std::pair<double, double> p;
  p.first = xw1;
  p.second = yw1;
  if ((yw1 - yw2) * (xp - xv) == (xw1 - xw2) * (yp - yv) && pv.inLine(p))
    h = true;
  if (pv.haveCommonPoint(w) && pv.haveCommonPoint(m))
    cout << "NO" << endl;
  else if (pv.haveCommonPoint(w) || h == true) {
    line pm(-m.b, m.a, m.b * xp - m.a * yp);
    std::pair<double, double> pm_m_m = pm.getPoint(m);
    std::pair<double, double> p_prime;
    p_prime.first = pm_m_m.first * 2 - xp;
    p_prime.second = pm_m_m.second * 2 - yp;
    line p_prime_v(p_prime.first, p_prime.second, xv, yv);
    if (m.haveCommonPoint(p_prime_v)) {
      std::pair<double, double> n = m.getPoint(p_prime_v);
      line pn(xp, yp, n.first, n.second);
      line vn(xv, yv, n.first, n.second);
      std::pair<double, double> t;
      t.first = -0.5;
      t.second = 1.5;
      if (!w.haveCommonPoint(pn) && !w.haveCommonPoint(vn))
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else
      cout << "NO" << endl;
  } else if (pv.haveCommonPoint(m))
    cout << "NO" << endl;
  else {
    if ((yw1 - yw2) * (xm1 - xm2) == (xw1 - xw2) * (ym1 - ym2) &&
        (yw1 - yw2) * (xp - xv) == (xw1 - xw2) * (yp - yv) && pv.inLine(p))
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
  cin >> xp;
  return 0;
}
