#include <iostream>
#include <iomanip>
#include <math.h>
#include <utility>
#include <cstdlib>
using namespace std;

int main(){
	double x[3], y[3], xp, yp;
	while (cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> xp >> yp){
		bool ans = true;
		//???????????¨????????????
		double gaiseki[3];	//gaiseki[i]???????????????P0P1??¨????????????P0Q????????????z??§?¨?
		for (int i = 0; i<3; i++){
			int k = (i + 1) % 3;
			double vx, vy, vpx, vpy;
			vx = x[k] - x[i];
			vy = y[k] - y[i];
			vpx = xp - x[i];
			vpy = yp - y[i];
			gaiseki[i] = vx*vpy - vy*vpx;
			if (gaiseki[i] <= 0) ans = false;
		}
		if (ans){
			cout << "YES" << endl;
		} else{
			cout << "NO" << endl;
		}
	}
	return 0;
}