#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<string>
using namespace std;

double getScale(double a, double b, double c, double d,double e,double f) {
	double x1, y1, x2, y2;

	x1 = c - a;
	x2 = e - a;
	y1 = d - b;
	y2 = f - b;

	double result = x1 * y2 - x2 * y1;
	if (result < 0)result *= -1;

	return 0.5 * result;

}

int main() {

	double x[4];
	double y[4];

	double value1, value2;

	while (cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> x[3] >> y[3]) {
		value1 = getScale(x[0], y[0], x[1], y[1], x[2], y[2]);
		value2 = getScale(x[3], y[3], x[1], y[1], x[2], y[2]) + getScale(x[0], y[0], x[3], y[3], x[2], y[2]) + getScale(x[0], y[0], x[1], y[1], x[3], y[3]);
		
		if (value2 > value1)printf("NO");
		else printf("YES");
		printf("\n");
	}

	//system("pause");
	return 0;
}
