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

double d(double x1,double y1,double x2,double y2)
{
	return sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
}

double s(double x1,double y1,double x2,double y2,double x3,double y3)
{
	double a = d(x1,y1,x2,y2),b = d(x1,y1,x3,y3),c = d(x2,y2,x3,y3);
	double p = (a + b + c)/2;
	return sqrt(p*(p-a)*(p-b)*(p-c));
}

int main()
{
	double x1,y1,x2,y2,x3,y3,xp,yp;
	while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp)
	{
	 double s1 = s(x1,y1,x2,y2,xp,yp),s2 = s(x1,y1,x3,y3,xp,yp),s3 = s(x2,y2,x3,y3,xp,yp),sum = s(x1,y1,x2,y2,x3,y3); 
	 if(abs(sum-(s1+s2+s3))<0.00000000000000000001) cout << "YES" << endl;
	 else cout << "NO" << endl; 
    }
	return 0;
}