
#include<iostream>
#include <math.h>
#include<cstdio>
using namespace std;

//???????????????
struct Vertex2D{
	double x;
	double y;
};
//?????????????????????(????????¨??????)
#define Vector2D Vertex2D

//???????????¢
double distance_vertex(Vertex2D p1, Vertex2D p2) {
	return pow( ( p2.x - p1.x ) * ( p2.x - p1.x ) + ( p2.y - p1.y ) * ( p2.y - p1.y ), 0.5 );
}

//??????????????????
double cross_vector(Vector2D vl, Vector2D vr) {
	return vl.x * vr.y - vl.y * vr.x;
}

//???P??¨???(AB)????????¢
double Distance_DotAndLine(Vertex2D P, Vertex2D A, Vertex2D B )
{
	Vector2D AB,AP;

	AB.x = B.x - A.x;
	AB.y = B.y - A.y;
	AP.x = P.x - A.x;
	AP.y = P.y - A.y;

	//????????????AB???AP??????????????¶???????????????????????¢D?????¢????????????
	double D =  cross_vector( AB, AP );

	double L = distance_vertex( A, B );	//AB???????????¢

	double H = D / L;
	return H;

}


int main(){

	struct  Vertex2D point[4];

	while(	scanf("%lf %lf %lf %lf %lf %lf %lf %lf ",&point[0].x , &point[0].y,
													 &point[1].x , &point[1].y,
													 &point[2].x , &point[2].y,
													 &point[3].x , &point[3].y) != EOF){
	int check = 0;
	for(int i=0;i<3;i++){
		double tmp =  Distance_DotAndLine(point[i%3],point[(i+1)%3],point[3]);
		if(tmp < 0){
			check--;
		}else{
			check++;
		}
	}
	if(check == 3 or check == -3){
		cout << "YES" << endl;

	}else{
		cout << "NO" << endl;

	}
	}
	return 0;
}