#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;

int main(){
	double x1,x2,x3,y1,y2,y3,xp,yp;
	double a,b,c,ap,bp,cp;
	double as,bs,cs,os;
	double A,B,C,O;
	double ans;
	while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>xp>>yp){
		a=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		b=sqrt((x3-x1)*(x3-x1)+(y1-y3)*(y1-y3));
		c=sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
		ap=sqrt((x1-xp)*(x1-xp)+(y1-yp)*(y1-yp));
		bp=sqrt((xp-x2)*(xp-x2)+(yp-y2)*(yp-y2));
		cp=sqrt((x3-xp)*(x3-xp)+(yp-y3)*(yp-y3));
		as=(a+ap+bp)/2;
		bs=(c+bp+cp)/2;
		cs=(b+ap+cp)/2;
		os=(a+b+c)/2;
		A=sqrt(as*(as-a)*(as-ap)*(as-bp));
		B=sqrt(bs*(bs-c)*(bs-bp)*(bs-cp));
		C=sqrt(cs*(cs-b)*(cs-ap)*(cs-cp));
		O=sqrt(os*(os-a)*(os-b)*(os-c));
		if(sqrt(A+B+C-O)<1e-9)cout<<"YES\n";
		else cout<<"NO\n";
	}
}