#include <iostream>

using namespace std;

typedef struct st_point {
	double x;
	double y;
} 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++){
			bool sign;
			bool sign2;
			
			if(vertex[i].x != vertex[(i+1)%3].x){
				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;
				
				sign  = (a * vertex[(i+2)%3].x + b * vertex[(i+2)%3].y + c > 0.0 ? true : false);
				sign2 = (a * pointP.x + b * pointP.y + c > 0.0 ? true : false);
			}
			else{
				sign  = (vertex[(i+2)%3].x - vertex[i].x ? true : false);
				sign2 = (pointP.x - vertex[i].x ? true : false);
			}
			
			if(sign != sign2){
				break;
			}
		}
		
		if(i == 3){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	
	return 0;
}