#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>

using namespace std;

int main()
{
	double x[3], y[3];
	double xp, yp;
	while (scanf("%lf %lf %lf %lf %lf %lf %lf %lf"
		, &x[0], &y[0], &x[1], &y[1], &x[2], &y[2], &xp, &yp) != EOF)
	{
		double cross[3];
		for (int i = 0; i < 3; ++i)
		{
			double ax = xp - x[i%3];
			double ay = yp - y[i%3];
			double bx = x[i%3+1] - x[i%3];
			double by = y[i%3+1] - y[i%3];
			cross[i] = ax * by - bx * ay;
		}
		if (cross[0] > 0 && cross[1] > 0 && cross[2] > 0
		|| cross[0] < 0 && cross[1] < 0 && cross[2] < 0)
			puts("YES");
		else
			puts("NO");
	}

	return 0;
}