#include <bits/stdc++.h>
using namespace std;
struct point {
  double x;
  double y;
};
struct line {
  double a;
  double b;
};
istream& operator>>(istream& s, point& p);
bool get_line(const point& a, const point& b, line* a_b);
bool get_position(const point& a, const point& b, const point& c);
bool get_cross(const point& a, const point& b, const point& c, const point& d);
bool get_convex(const point& a, const point& b, const point& c, const point& d);
int main(void) {
  point a, b, c, d;
  while (1) {
    cin >> a >> b >> c >> d;
    if (cin.eof()) break;
    if (get_convex(a, b, c, d))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
istream& operator>>(istream& s, point& p) { return s >> p.x >> p.y; }
bool get_line(const point& a, const point& b, line* a_b) {
  if (fabs(a.x - b.x) < 1e-5)
    return false;
  else {
    a_b->a = (a.y - b.y) / (a.x - b.x);
    a_b->b = a.y - (a.x * a_b->a);
    return true;
  }
}
bool get_position(const point& a, const point& b, const point& c) {
  line a_b;
  bool result = get_line(a, b, &a_b);
  if (result == false) {
    if (c.x > a.x)
      return true;
    else
      return false;
  } else {
    if (c.y > a_b.a * c.x + a_b.b)
      return true;
    else
      return false;
  }
}
bool get_cross(const point& a, const point& b, const point& c, const point& d) {
  bool result_ac_b = get_position(a, c, b);
  bool result_ac_d = get_position(a, c, d);
  if (result_ac_b == result_ac_d)
    return false;
  else
    return true;
}
bool get_convex(const point& a, const point& b, const point& c,
                const point& d) {
  bool result_ac_bd = get_cross(a, b, c, d);
  bool result_bd_ac = get_cross(b, a, d, c);
  if (result_ac_bd == true && result_bd_ac == true)
    return true;
  else
    return false;
}
