#include <iostream>

using namespace std;

typedef struct st_point {
	double x;
	double y;
} Point;

bool isPositiveFuncVal(double &a, double &b, double &c, Point &point);

int main(void)
{
	Point vertex[3] = {{0}, {0}, {0}};
	Point pointP = {0};
	
	while(cin >> vertex[0].x >> vertex[0].y >> vertex[1].x >> vertex[1].y >> vertex[2].x >> vertex[2].y >> pointP.x >> pointP.y){
		int i = 0;
		for(i = 0; i < 3; i++){
			double a = (vertex[i].y - vertex[(i+1)%3].y) / (vertex[i].x - vertex[(i+1)%3].x);
			double b = -1.0;
			double c = vertex[i].y - a * vertex[i].x;
			
			if( isPositiveFuncVal(a, b, c, vertex[(i+2)%3]) != isPositiveFuncVal(a, b, c, pointP) ){
				break;
			}
		}
		
		if(i == 3){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	
	return 0;
}

bool isPositiveFuncVal(double &a, double &b, double &c, Point &point)
{
	return a * point.x + b * point.y + c > 0 ? true : false;
}