#include <iostream>
#include <cmath>
using namespace std;

struct vec2
{
	double x;
	double y;
};

//2次元ベクトル外積
double Outer_products(const vec2 (&a)[2]) {
	return (a[0].x * a[1].y - a[0].y * a[1].x);
}

//符号判定  '+' is (1) , '-' is (-1) , '0' is (0)
double Sign(const double &p) {
	return (p > 0) - (p < 0);
}

//３つの引数の符号が同じ場合true
bool Is_all_three(const double (&check)[3]) {
	int cnt = 0;
	for (int i = 0; i < 3; ++i) {
		cnt += Sign(check[i]);
	}
	return (abs(cnt) == 3) ? true : false;
}

int main() {
	vec2 ver[3];
	vec2 p;
	vec2 tmp[2];
	double check[3];

	while (true) {
		if (cin.eof())break;
		for (int i = 0; i < 3; ++i) {
			cin >> ver[i].x;
			cin >> ver[i].y;
		}
		cin >> p.x >> p.y;

		for (int i = 0; i < 3; ++i) {
			tmp[0].x = ver[(i + 1) % 3].x - ver[i].x;
			tmp[0].y = ver[(i + 1) % 3].y - ver[i].y;
			tmp[1].x = p.x - ver[i].x;
			tmp[1].y = p.y - ver[i].y;
			check[i] = Outer_products(tmp);
		}
		if (Is_all_three(check)) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	
	return 0;
}
