#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <fstream>
#include <sstream>
#include <string>
#include <iomanip>
#include <math.h>
#include <limits>
#include <chrono>

using namespace std;

class vec2d
{
public:
	vec2d() : x(0.0), y(0.0) {};
	vec2d(double _x, double _y) : x(_x), y(_y) {};
	double x, y;
	vec2d operator-(const vec2d &);
	double vec(const vec2d &);
};

vec2d vec2d::operator-(const vec2d &b)
{
	vec2d r;
	r.x = x - b.x;
	r.y = y - b.y;
	return r;
}

double vec2d::vec(const vec2d &b)
{
	return x * b.y - y * b.x;
}

int main()
{
	double x1, y1, x2, y2, x3, y3, xp, yp;
	while(1)
	{
		if (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp)
		{
			vec2d a(x1, y1), b(x2, y2), c(x3, y3), p(xp, yp);

			vec2d ab, bc, ca, ap, bp, cp;
			ab = a - b;
			bp = b - p;
			bc = b - c;
			cp = c - p;
			ca = c - a;
			ap = a - p;

			double c1, c2, c3;
			c1 = ab.vec(bp);
			c2 = bc.vec(cp);
			c3 = ca.vec(ap);

			if ((c1 > 0 && c2 > 0 && c3 > 0) || (c1 < 0 && c2 < 0 && c3 < 0))
				cout << "YES" << '\n';
			else
				cout << "NO" << '\n';
		}
		else
			break;
	}

	return 0;
}