#include<iostream>
#include<string>
using namespace std;
int main(){
	double x1,x2,x3,y1,y2,y3,xp,yp;
	while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>xp>>yp){
		bool t=true;
		double a,b;
		a=(y2-y1)/(x2-x1);
		b=y1-a*x1;
		if(y3>a*x3+b&&yp<a*xp+b||y3<a*x3+b&&yp>a*xp+b)
			t=false;
		a=(y3-y1)/(x3-x1);
		b=y1-a*x1;
		if(y2>a*x2+b&&yp<a*xp+b||y2<a*x2+b&&yp>a*xp+b)
			t=false;
		a=(y3-y2)/(x3-x2);
		b=y1-a*x1;
		if(y1>a*x1+b&&yp<a*xp+b||y1<a*x1+b&&yp>a*xp+b)
			t=false;
		if(t==true)
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
    return 0;
}
 