#include <bits/stdc++.h>

using namespace std;

struct Vector {
  double x, y;
  Vector() {}
  Vector(double x, double y): x(x), y(y) {}
  Vector operator+(Vector v) { return Vector(x + v.x, y + v.y); }
  Vector operator-(Vector v) { return Vector(x - v.x, y - v.y); }
  Vector operator*(double k) { return Vector(x * k, y * k); }
  Vector operator/(double k) { return Vector(x / k, y / k); }
  bool operator==(Vector v)  { return abs(x - v.x) < 1e-10 && abs(y - v.y) < 1e-10; }
  friend void input(Vector &v) { cin >> v.x >> v.y; }
  friend double norm(Vector v) { return dot(v, v); }
  friend double  abs(Vector v) { return sqrt(norm(v)); }
  friend double   dot(Vector v1, Vector v2) { return v1.x * v2.x + v1.y * v2.y; }
  friend double cross(Vector v1, Vector v2) { return v1.x * v2.y - v1.y * v2.x; }
  friend void show(Vector v) { if (abs(v.x) < 1e-10) v.x = 0.0; if (abs(v.y) < 1e-10) v.y = 0.0; printf("%.10f %.10f\n", v.x, v.y); }
  friend bool ccw(Vector v, Vector v1, Vector v2) { return cross(v1 - v, v2 - v) > 1e-10; }
  friend bool  cw(Vector v, Vector v1, Vector v2) { return cross(v1 - v, v2 - v) < -1e-10; }
  friend bool parallel(Vector v1, Vector v2) { return abs(cross(v1, v2)) < 1e-10; }
  friend bool onLine(Vector v, Vector v1, Vector v2) { return v == v1 || v == v2 || (parallel(v1 - v, v2 - v) && dot(v1 - v, v2 - v) < -1e-10); }
  friend int direct(Vector v1, Vector v2, Vector v) { if (ccw(v1, v2, v)) return  1; if ( cw(v1, v2, v)) return -1; if (dot(v2 - v1, v - v1) < -1e-10) return  2; if (dot(v1 - v2, v - v2) < -1e-10) return -2; return 0; }
};
typedef Vector Point;

int main(void) {
  Point p[4];
  while (cin >> p[0].x >> p[0].y) {
    for (int i = 1; i < 4; i++) {
      input(p[i]);
    }

    cout << ((ccw(p[3], p[0], p[1]) && ccw(p[3], p[1], p[2]) && ccw(p[3], p[2], p[0])) || (cw(p[3], p[0], p[1]) && cw(p[3], p[1], p[2]) && cw(p[3], p[2], p[0])) ? "YES" : "NO") << endl;
  }

  return 0;
}
