#include <bits/stdc++.h>
using namespace std;

typedef complex<double> P;

double cross(P a,P b){
	return imag(a*conj(b));
}
double area(P a,P b,P c){
	return abs(cross(a-c,b-c));
}
bool on(P a,P b,P p){
	return abs(a-p) + abs(p-b) - abs(a-b) < 1e-9;
}


P in(){
	double x,y;
	if(cin >> x >> y)
		return P(x,y);
	else exit(0);
}
int main(){
	P a,b,c,d;
	while(true){
		a = in();
		b = in();
		c = in();
		d = in();
		if( !on(a,b,d) and !on(b,c,d) and !on(c,a,d) and area(a,b,d) + area(b,c,d) + area(c,a,d) - area(a,b,c) < 1e-9 )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}