#include <iostream>
#include <complex>
using namespace std;

typedef complex<double> P;
const double precision = 1e-10;
bool eql(double a, double b) { return abs(a - b) < precision; }
double cross(P a, P b) { return a.real()*b.imag() - b.real()*a.imag(); }
bool leftp(P start, P end, P p) { return cross(end-start, p-start) > -precision; }
bool intrianglep(P a, P b, P c, P p) {
  return (leftp(b, a, p) && leftp(c, b, p) && leftp(a, c, p))
         || (leftp(b, c, a) && leftp(a, b, c) && leftp(c, a, p));
}

int main(int argc, char **argv)
{
  P a, b, c, x;
  double p, q, r, s, t, u, v, w;

  for (;;) {
    cin >> p >> q >> r >> s >> t >> u >> v >> w;
    a = P(p, q);
    b = P(r, s);
    c = P(t, u);
    x = P(v, w);
    if (cin.eof())
      break;

    if (intrianglep(a, b, c, x))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}