#include <iostream>
using namespace std;
double op(double x1,double y1,double x2,double y2){
	return x1*y2-x2*y1;
}

int main(){
	double x[4],y[4];
	while(cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2] >> x[3] >> y[3]){
		double op1 = op(x[1]-x[0],y[1]-y[0],x[3]-x[0],y[3]-y[0]);
		double op2 = op(x[2]-x[1],y[2]-y[1],x[3]-x[1],y[3]-y[1]);
		double op3 = op(x[0]-x[2],y[0]-y[2],x[3]-x[2],y[3]-y[2]);
		if(op1<=0.0 and op2<=0.0 and op3<=0.0) cout << "YES" << endl;
		else if(op1>=0.0 and op2>=0.0 and op3>=0.0) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}