#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
struct P {
  double first, second;
  P() {}
  P(double first, double second) : first(first), second(second) {}
  bool operator<(const P &p) const {
    return ((first) < (p.first) - 1e-9) ||
           ((fabs(first - p.first) < 1e-9) && ((second) < (p.second) - 1e-9));
  }
  double operator^(const P &p) const {
    return first * p.second - second * p.first;
  }
  P operator-(const P &p) const {
    return P(first - p.first, second - p.second);
  }
  P operator+(const P &p) const {
    return P(first + p.first, second + p.second);
  }
  P operator*(double u) const { return P(first * u, second * u); }
  double operator*(const P &p) const {
    return first * p.first + second * p.second;
  }
  double len() { return sqrt(((first) * (first)) + ((second) * (second))); }
  void eat() { scanf("%lf%lf", &first, &second); }
  P nor() {
    if ((fabs(len() - 0) < 1e-9)) return *this;
    return *this * (1. / len());
  }
  P rot(double the) {
    return P(first * cos(the) - second * sin(the),
             first * sin(the) + second * cos(the));
  }
};
P a, b, w1, w2, m1, m2;
P ra, rb, rw1, rw2;
P reflect(P p) {
  P ret;
  double first = ((m2 - m1) ^ (p - m1)) / (m2 - m1).len();
  if (first == 0) return p;
  p = p - m1;
  P n = (m2 - m1).nor();
  if ((((n ^ p)) < (0) - 1e-9)) {
    n = n.rot(pi / 2);
  } else
    n = n.rot(-(pi / 2));
  n = n * (2 * fabs(first));
  return ret = p + n + m1;
}
bool inter(P a, P b, P c, P d) {
  double s, t;
  P ab = b - a, cd = d - c;
  if ((fabs(0 - (ab ^ cd)) < 1e-9)) {
    if ((fabs((c - a).len() + ((b - c).len()) - (b - a).len()) < 1e-9))
      return true;
    return false;
  }
  s = ((cd ^ c) - (cd ^ a)) / (cd ^ ab);
  t = ((ab ^ a) - (ab ^ c)) / (ab ^ cd);
  if (((s) > (0) - 1e-9) && ((s) < (1) + 1e-9) && ((t) > (0) - 1e-9) &&
      ((t) < (1) + 1e-9))
    return 1;
  return 0;
}
int main() {
  a.eat();
  b.eat();
  w1.eat();
  w2.eat();
  m1.eat(), m2.eat();
  ra = reflect(a);
  rb = reflect(b);
  rw1 = reflect(w1);
  rw2 = reflect(w2);
  if (!inter(a, b, m1, m2) && !inter(a, b, w1, w2)) {
    printf("YES\n");
    return 0;
  }
  if (inter(a, rb, m1, m2) && !inter(a, rb, rw1, rw2) && inter(b, ra, m1, m2) &&
      !(inter(b, ra, rw1, rw2))) {
    printf("YES\n");
    return 0;
  }
  printf("NO\n");
  return 0;
}
