#include <iostream>

using namespace std;

typedef struct _Point {
	double x;
	double y;
} Point;

typedef struct _Line {
	Point a;
	Point b;
} Line;

typedef struct _Triangle {
	Point a;
	Point b;
	Point c;
} Triangle;

double interSect(Point p1, Point p2, Point p3, Point p4) {
	double ret = 0, ret_ = 0;
	ret += (p1.x - p2.x) * (p3.y - p1.y);
	ret += (p1.y - p2.y) * (p1.x - p3.x);
	ret_ += (p1.x - p2.x) * (p4.y - p1.y);
	ret_ += (p1.y - p2.y) * (p1.x - p4.x);
	ret *= ret_;
	return ret;
}

bool pointInaTriangle(Point p, Triangle t) {
	if ((t.a.x - t.c.x) * (t.a.y - t.b.y) == (t.a.x - t.b.x) * (t.a.y - t.c.y))
		return false;
	Point c;
	c.x = (t.a.x + t.b.x + t.c.x) / 3;
	c.y = (t.a.y + t.b.y + t.c.y) / 3;
	double pab = interSect(t.a, t.b, p, c);
	double pbc = interSect(t.b, t.c, p, c);
	double pca = interSect(t.c, t.a, p, c);
	if (pab < 0 && pbc < 0 && pca < 0)
		return true;
	return false;
}

int main() {
	Triangle t;
	Point p;
	while (cin >> t.a.x >> t.a.y >> t.b.x >> t.b.y >> t.c.x >> t.c.y >> p.x >> p.y) {
		if (pointInaTriangle(p, t) == true)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}