#include<iostream>
#include<complex>
using namespace std;
typedef complex<double> P;
#define EPS 1.0e-12
#define F(I,J,N) for(int I=J;I<N;I++)

class Line{
public:
	P p[2];
	P v;
	Line(){}
	Line(P p0,P p1){
		p[0]=p0;
		p[1]=p1;
		v=p1-p0;
	}
	//線分の長さ
	double length(){return abs(v);}
	//平行
	bool Parallel(Line l){
		return (cross(v,l.v)==0);
	}
	//線分上
	bool OnLine(P a){
		return (abs(p[0]-a)+abs(a-p[1])<length()+EPS);
	}
	double cross(Line l){
		return cross(v,l.p[0]-p[0]) * cross(v,l.p[1]-p[0]);
	}
	double cross(P a,P b){
		return (real(a)*imag(b)-imag(a)*real(b));
	}
	bool Intersection(Line l){
		if(Parallel(l)){
			return (OnLine(l.p[0])||OnLine(l.p[1])||l.OnLine(p[0])||l.OnLine(p[1]));
		}
		return ((cross(l)<EPS) && (l.cross(*this))<EPS);
	}
};

class Pi{
private:
	P *p;
	Line *l;
	int n;
public:
	Pi(){}
	Pi(int n){
		this->n=n;
		p=new P[n+1];
		l=new Line[n];
	}
	~Pi(){
		delete []p;
		delete []l;
	}
	void set(int i,P a){
		if(i==0){
			p[0]=a;
			p[n]=a;
		}
		else p[i]=a;
	}
	void set(){
		F(i,0,n) l[i]=Line(p[i],p[i+1]);
	}
	bool isin(P a,double x){
		F(i,0,n) if(l[i].OnLine(a)) return true;
		int cnt=0;
		P out=(a-(p[0]+p[1])/2.0);
		out=a+out*(x-real(a)-1)/real(out);
		Line buf(a,out);
		F(i,0,n) if(l[i].Intersection(buf)) cnt++;
		if(cnt&1) return true;
		return false;
	}
};

int main(){
	double a,b,c,d,e,f,g,h;
	P p[3],q;
	Pi *in;
	while(cin>>a>>b>>c>>d>>e>>f>>g>>h){
		p[0]=P(a,b);
		p[1]=P(c,d);
		p[2]=P(e,f);
		q=P(g,h);
		in=new Pi(3);
		F(i,0,3) in->set(i,p[i]);
		in->set();
		if(in->isin(q,-101)) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
		delete in;
	}
	return 0;
}