//0012 A Point in a Triangle
//½ÊóÉA(x1,y1),(x2,y2),(x3,y3)ð¸_Æµ½Op`ª é
//»ÌOp`É_pªàÉÜÜêÄ¢éÈçÎYESA»¤ÅÈ¢ÈçNOÆoÍ¹æ
//È¨AOp`ÌÓãâ¸_ÍÜÜÈ¢àÌÆ·é

//üÍÍA¡ÌsÅ^¦çêAEOFÉÄI¹·é
//»ê¼êÌsÉÄAx1 y1 x2 y2 x3 y3 xp ypª¼pXy[XæØèÅ^¦çêé
//±êçÍ-100ÈãA100ÈºÌÀÅ é

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

struct Point
{
	double x, y;
	Point(){}
	Point(double x, double y):x(x),y(y){}
};

//http://www5d.biglobe.ne.jp/~tomoya03/shtml/algorithm/Hougan.htm
//¼üÆüªÌ½è»èÅßé

//from1©çto1ÜÅÌ¼üÆAfrom2©çto2ÜÅÌüªªð·µÄ¢é©
//ßèlª0:¼üÆüªÍdÈÁÄ¢é@>0Fð·µÄ¢é@<0Fð·µÄÈ¢
double Intersect(const Point &from1, const Point &to1, const Point &from2, const Point &to2)
{
	return (
		((from1.x-to1.x)*(from2.y-from1.y) + (from1.y-to1.y)*(from1.x-from2.x)) *
		((from1.x-to1.x)*(to2.y-from1.y) + (from1.y-to1.y)*(from1.x-to2.x))
		);
}
bool IsInvolve(const Point &a, const Point &b, const Point &c, const Point &p)
{
	if(Intersect(a,b,p,c) <= 0)
		return false;
	if(Intersect(b,c,p,a) <= 0)
		return false;
	if(Intersect(c,a,p,b) <= 0)
		return false;
	return true;
}

int main(void)
{
	Point a, b, c, p;
	while(cin >> a.x >> a.y >> b.x >> b.y
		>> c.x >> c.y >> p.x >> p.y)
	{
		if(IsInvolve(a, b, c, p))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}