#include<iostream>
using namespace std;
int main(){
	double x[3],y[3],xp,yp,r,xmax,xmin,ymax,ymin;
	int sum;
	while(cin>>x[0]>>y[0]>>x[1]>>y[1]>>x[2]>>y[2]>>xp>>yp){
		xmax=max(x[0],max(x[1],x[2]));
		ymax=max(y[0],max(y[1],y[2]));
		xmin=min(x[0],min(x[1],x[2]));
		ymin=min(y[0],min(x[1],x[2]));
		sum=0;
		if(x[0]-x[1]==0)
			;
		else{
			r=(y[0]-y[1])*(xp-x[0])/(x[0]-x[1])+y[0];
		if(yp<r&&r>=ymin&&r<=ymax)
			sum++;
		}
		if(x[0]-x[2]==0)
		;
		else{
		r=(y[0]-y[2])*(xp-x[0])/(x[0]-x[2])+y[0];
		if(yp<r&&r>=ymin&&r<=ymax)
			sum++;
		}
		if(x[2]-x[1]==0)
			;
		else{
		r=(y[2]-y[1])*(xp-x[2])/(x[2]-x[1])+y[2];
			if(yp<r&&r>=ymin&&r<=ymax)
			sum++;
		}
		if(sum==1&&xp>=xmin&&xp<=xmax)
		cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}