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

typedef complex<double> P;

int main(void){
  double x1, x2, x3, y1, y2, y3, xp, yp;
  while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){
    P a1(x1 - x3, y1 - y3), b1(x2 - x3, y2 - y3), c1(xp - x3, yp - y3);
    P a2(x1 - x2, y2 - y2), b2(x3 - x2, y3 - y2), c2(xp - x2, yp - y2);
    P a3(x3 - x1, y3 - y1), b3(x2 - x1, y2 - y1), c3(xp - x1, yp - y1);
    
    double area11, area12, area21, area22, area31, area32;
    area11 = (a1 * conj(c1)).imag();
    area12 = (b1 * conj(c1)).imag();
    area21 = (a2 * conj(c2)).imag();
    area22 = (b2 * conj(c2)).imag();
    area31 = (a3 * conj(c3)).imag();
    area32 = (b3 * conj(c3)).imag();

    if(((area11 > 0 && area12 < 0) || (area11 < 0  && area12 > 0))
        && ((area21 > 0 && area22 < 0) || (area21 < 0 && area22 > 0))
        && ((area31 > 0 && area32 < 0) || (area31 < 0 && area32 > 0))){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}