#include <iostream>
#include <math.h>
using namespace std;

int main(){

	double x[3],y[3],px,py,x1,x2,y1,y2,f;
	int f3,i;
		
	while(scanf("%f%f%f%f%f%f%f%f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&px,&py)>0){
		f3=0;
		for(i=0;i<3;i++){
			x1=x[i];
			y1=y[i];
			x2=x[(i+1)%3];
			y2=y[(i+1)%3];
			f=x1*(py-y2)+px*(y2-y1)+x2*(y1-py);
			if(f>0){
				f3++;
			}else if(f<0){
				f3--;
			}
			cout << f << endl;
		}
		if(abs(f3)==3)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}