#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;

int side(Point p, Line l) {
	int n = p.x * (l.a.y - l.b.y) + l.a.x * (l.b.y - p.y) + l.b.x * (p.y - l.a.y);
	if (n > 0) return 1;
	else if (n < 0) return -1;
	else return 0;
}

bool pointInaTriangle(Point p, Triangle t) {
	Line ab, bc, ca;
	ab.a = t.a; ab.b = t.b;
	bc.a = t.b; bc.b = t.c;
	ca.a = t.c; ca.b = t.a;
	int pab = side(p, ab);
	int pbc = side(p, bc);
	int pca = side(p, ca);
	if (0 < pab && 0 < pbc && 0 < pca)
		return true;
	if (0 > pab && 0 > pbc && 0 > pca)
		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;
}