#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	double x1, x2, x3, xp;
	double y1, y2, y3, yp;

	while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
		double S = fabs((x2 - x1)*(y3 - y1) - (y2 - y1)*(x3 - x1)) / 2.0;
		
		x1 -= xp; y1 -= yp;
		x2 -= xp; y2 -= yp;
		x3 -= xp; y3 -= yp;
		
		double s1 = fabs(x1*y2 - y1*x2) / 2.0;
		double s2 = fabs(x2*y3 - y2*x3) / 2.0;
		double s3 = fabs(x3*y1 - y3*x1) / 2.0;

		if (fabs(S - s1 - s2 - s3) < 0.00000000001)
			cout << "YES\n";
		else
			cout << "NO\n";
	}
}
