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

typedef complex<double> P;

#define EPS (1e-8)

double area(double a, double b, double c){
  double s = (a + b + c) / 2;
  return sqrt(s*(s-a)*(s-b)*(s-c));
}

int main(void){
  double x1, x2, x3, y1, y2, y3, xp, yp;
  while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){
    P a = P(x1, y2), b = P(x2, y2), c = P(x3, y3), p = P(xp, yp);
    double ab = abs(a - b), bc = abs(b - c), ca = abs(c - a);
    double ap = abs(a - p), bp = abs(b - p), cp = abs(c - p);
    double abc = area(ab, bc, ca);
    double abp = area(ab, ap, bp);
    double acp = area(ca, ap, cp);
    double bcp = area(bc, bp, cp);
    double diff = (abp + acp + bcp) - abc;

    if(diff < EPS) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
  return 0;
}