#include <cstdio>
#include <iostream>
#include <math.h>

using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)

bool judge(double x[3], double y[3]) {
	double rad1 = atan2(y[0], x[0]);
	double rad2 = atan2(y[1], x[1]);
	double rad3 = atan2(y[2], x[2]);
	if(rad3 < rad1 && rad2 < rad3 || rad1 < rad3 && rad3 < rad2) return true;
	else return false;
}

int main() {
	double x1, y1, x2, y2, x3, y3, xp, yp;
	while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf\n", &x1, &y1, &x2, &y2, &x3, &y3, &xp, &yp) != EOF) {
		double x[3], y[3];
		x[0] = x2 - x1;
		y[0] = y2 - y1; 
		x[1] = x3 - x1;
		y[1] = y3 - y1;
		x[2] = xp - x1;
		y[2] = yp - y1;
		if(!judge(x, y)) {
			cout << "NO" << endl;
			break;
		}
		x[0] = x1 - x2;
		y[0] = y1 - y2;
		x[1] = x3 - x2;
		y[1] = y3 - y2;
		x[2] = xp - x2;
		y[2] = yp - y2;
		if(!judge(x, y)) {
			cout << "NO" << endl;
			break;
		}
		x[0] = x1 - x3;
		y[0] = y1 - y3;
		x[1] = x2 - x3;
		y[1] = y2 - y3;
		x[2] = xp - x3;
		y[2] = yp - y3;
		if(!judge(x, y)) {
			cout << "NO" << endl;
			break;
		}
		cout << "YES" << endl;
	}
	return 0;
}