#include<string>
#include<vector>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<functional>
#include<map>
#include<set>
#include<cmath>

#define REP(i,s,e) for(int i=int(s);i<int(e);i++)
#define rep(i,n) for(int i=0;i<int(n);i++)

#define EPS 1e-9

using namespace std;

bool intriangle(double x1,double y1,double x2,double y2,double x3,double y3,double xp,double yp){

double d=(x1-xp)*(x1-xp)+(y1-yp)*(y1-yp);
double a=(y1-yp)/(x1-xp);
double b=(y3-y2)/(x3-x2);
double x=(y2-yp-b*(x2-xp))/(a-b);
double y=(a*(y2-yp)-a*b*(x2-xp))/(a-b);

if(x1!=xp && x2!=x3 && a!=b && d<(x-x1+xp)*(x-x1+xp)+(y-y1+yp)*(y-y1+yp) && min(x2-xp,x3-xp)<x && max(x2-xp,x3-xp)>x)
return true;

else if(x1==xp && x2!=x3 && abs(y1-yp)<abs(y1-y2+b*(x2-xp)) && (x2-xp)*(x3-xp)<0)
return true;

else if(x1!=xp && x2==x3 && d<(x2-x1)*(x2-x1)+(a*(x2-xp)-y1+yp)*(a*(x2-xp)-y1+yp) && min(y1-yp,y3-yp)<a*(x2-xp) && max(y1-yp,y3-yp)>a*(x2-xp))
return true;
else return false;

}

int main(){

	double x1,y1,x2,y2,x3,y3,xp,yp;

	while(true){

	cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp;

	if(cin.fail()) break;

	if(intriangle(x1,y1,x2,y2,x3,y3,xp,yp))
	cout << "YES" << endl;
	else cout << "NO" << endl;

	}

	return 0;
}