#if 0

#endif

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef complex<double> xy_t;

double dot_product(xy_t a, xy_t b) {
  return (conj(a)*b).real();
}
double cross_product(xy_t a, xy_t b) {
  return (conj(a)*b).imag();
}
xy_t projection(xy_t p, xy_t b) {
  return b*dot_product(p,b)/norm(b);
}

int main() {
  double x[4], y[4];
  while (true) {
    for (int i=0; i<4; ++i)
      cin >> x[i] >> y[i];
    if (!cin)
      break;
    xy_t a(x[0],y[0]), b(x[1],y[1]), c(x[2],y[2]), p(x[3],y[3]);
    double a1 = cross_product(a - p, b - p), a2 = cross_product(b - p, c - p), a3 = cross_product(c - p, a - p);
    bool ok = ((a1*a2 > 0.0) && (a2*a3 > 0.0) && (a3*a1 > 0.0));
    cout << (ok ? "YES" : "NO") << endl;
  }
}

