#include <iostream>

#define SIZE 3

using namespace std;

float innerProduct(float xp, float yp, float x1, float y1, float x2, float y2) {
	return (x1-xp) * (x1-x2) + (y1-yp) * (y1-y2);
}

int main() {
	float x[SIZE], y[SIZE], xp, yp, a, b, c;

	while (cin>>x[0]>>y[0]>>x[1]>>y[1]>>x[2]>>y[2]>>xp>>yp) {
		a = innerProduct(xp, yp, x[0], y[0], x[1], y[1]);
		b = innerProduct(xp, yp, x[1], y[1], x[2], y[2]);
		c = innerProduct(xp, yp, x[2], y[2], x[0], y[0]);

		if ((a > 0 && b > 0 && c > 0) || (a < 0 && b < 0 && c < 0)) {
			cout << "YES";
		}
		else {
			cout << "NO";
		}
		cout << endl;
	}
	return 0;
}