#include <iostream>

using namespace std;


int main(){
	double x[3], y[3];
	double px, py;

	double ax, ay, bx, by;
	double s, t;

	while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> px >> py){
		ax = x[1]-x[0];
		ay = y[1]-y[0];
		bx = x[2]-x[0];
		by = y[2]-y[0];
		px = px-x[0];
		py = py-y[0];

		t = (px*by - py*bx)/(ax*by - ay*by);
		s = (px*ay - py*ax)/(ay*bx - ax*by);

		if(t > 0 && s > 0 && t+s < 1) cout << "YES" << endl;
		else cout << "NO" << endl;

	}
}