#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-15;
pair<pair<double, double>, pair<double, double> > l1, l2, l3;
pair<double, double> operator+(const pair<double, double> &a,
                               const pair<double, double> &b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
pair<double, double> operator-(const pair<double, double> &a,
                               const pair<double, double> &b) {
  return make_pair(a.first - b.first, a.second - b.second);
}
pair<double, double> operator*(const pair<double, double> &a, double b) {
  return make_pair(a.first * b, a.second * b);
}
pair<double, double> operator/(const pair<double, double> &a, double b) {
  return make_pair(a.first / b, a.second / b);
}
pair<double, double> left_Rotate(pair<double, double> first) {
  return make_pair(-first.second, first.first);
}
pair<double, double> right_Rotate(pair<double, double> first) {
  return make_pair(first.second, -first.first);
}
double cha(pair<double, double> first, pair<double, double> second) {
  return first.first * second.second - first.second * second.first;
}
double dot(pair<double, double> first, pair<double, double> second) {
  return first.first * second.first + first.second * second.second;
}
double dis(pair<double, double> first) { return sqrt(dot(first, first)); }
bool jiao(pair<pair<double, double>, pair<double, double> > first,
          pair<pair<double, double>, pair<double, double> > second, bool flag) {
  if (min(first.first.first, first.second.first) >
          max(second.first.first, second.second.first) ||
      max(first.first.first, first.second.first) <
          min(second.first.first, second.second.first) ||
      min(first.first.second, first.second.second) >
          max(second.first.second, second.second.second) ||
      max(first.first.second, first.second.second) <
          min(second.first.second, second.second.second))
    return false;
  double a = cha(second.first - first.second, first.first - first.second),
         b = cha(first.first - first.second, second.second - first.second);
  if (a * b < 0 || abs(a + b) - eps < 0 && abs(a * b) - eps < 0 && !flag)
    return false;
  a = cha(first.first - second.second, second.first - second.second),
  b = cha(second.first - second.second, first.second - second.second);
  if (a * b < 0 || abs(a + b) - eps < 0 && abs(a * b) - eps < 0 && !flag)
    return false;
  return true;
}
pair<double, double> dui(
    pair<double, double> first,
    pair<pair<double, double>, pair<double, double> > second) {
  double a = second.first.second - second.second.second,
         b = second.second.first - second.first.first,
         c = second.first.first * second.second.second -
             second.second.first * second.first.second;
  pair<double, double> d = second.second - second.first;
  double q = cha(first - second.first, d);
  if (abs(q) < eps) return first;
  if (q > 0)
    d = left_Rotate(d);
  else
    d = right_Rotate(d);
  d = d / dis(d);
  double l = fabs(first.first * a + first.second * b + c) / sqrt(a * a + b * b);
  d = d * (l * 2);
  return first + d;
}
int main() {
  scanf("%lf%lf%lf%lf", &l1.first.first, &l1.first.second, &l1.second.first,
        &l1.second.second);
  scanf("%lf%lf%lf%lf", &l2.first.first, &l2.first.second, &l2.second.first,
        &l2.second.second);
  scanf("%lf%lf%lf%lf", &l3.first.first, &l3.first.second, &l3.second.first,
        &l3.second.second);
  if (!jiao(l1, l2, true) && !jiao(l1, l3, false)) {
    printf("YES\n");
    return 0;
  }
  l1.first = dui(l1.first, l3);
  if (!(!jiao(l1, l2, true) && jiao(l1, l3, false))) {
    printf("NO\n");
    return 0;
  }
  l1.first = dui(l1.first, l3);
  l1.second = dui(l1.second, l3);
  if (!(!jiao(l1, l2, true) && jiao(l1, l3, false))) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  return 0;
}
