#include <iostream>
using namespace std;

typedef struct{
	double x;
	double y;
	double z;
} vec3D;

double cross_z(vec3D v1,vec3D v2){
	return v1.x*v2.y-v1.y*v2.x;
}

int main(){
	double x1,x2,x3,y1,y2,y3,xp,yp;
	vec3D v1,v2,v3,vp1,vp2,vp3;

	while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>xp>>yp){
		v1.x=x1-x2;v2.x=x2-x3;v3.x=x3-x1;
		v2.y=y1-y2;v2.y=y2-y3;v3.y=y3-y1;
		v1.z=v2.z=v3.z=0;
		vp1.x=xp-x1;vp2.x=xp-x2;vp3.x=xp-x3;
		vp1.y=yp-y1;vp2.y=yp-y2;vp3.y=yp-y3;
		vp1.z=vp2.z=vp3.z=0;

		if(cross_z(v1,vp1)>0 && cross_z(v2,vp2)>0 && cross_z(v3,vp3)>0 || cross_z(v1,vp1)<=0 && cross_z(v2,vp2)<=0 && cross_z(v3,vp3)<=0){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}

	return 0;
}