#include <bits/stdc++.h>

using namespace std;

const double ESP=1e-8;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)
#define eq(a,b) a-b<ESP

double x[3],y[3];
double xp,yp;

int main(){
  while (cin>>x[0]>>y[0]>>x[1]>>y[1]>>x[2]>>y[2]>>xp>>yp){
    bool yes=true;
    REP(i,3){
      double flg,flg2;
      if (eq(x[i],x[(i+1)%3])){
	flg=x[(i+2)%3]-x[i];
	flg2=xp-x[i];
	if (flg*flg2<0){
	  yes=false;
	}
      }
      else{
	double m=(y[(i+1)%3]-y[i])/(x[(i+1)%3]-x[i]);
	double n=-x[i]*m+y[i];
	flg=y[(i+2)%3]-(m*x[(i+2)%3]+n);
	flg2=yp-(m*xp+n);
	if (flg*flg2<0){
	  yes=false;
	}
      }
    }
    cout<<(yes ? "YES" : "NO")<<endl;
  }
  return 0;
}