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

class point{ // as necessary
	private:
		static const double EPS=1e-5;
	public:
		static const int COUNTER_CLOCKWISE=1;
		static const int CLOCKWISE=-1;
		static const int ONLINE_BACK=2;
		static const int ONLINE_FRONT=-2;
		static const int ON_SEGMENT=0;

		double x;
		double y;
		point(double x=0,double y=0):x(x),y(y){}

		point operator+(point p){return point(x+p.x,y+p.y);}
		point operator-(point p){return point(x-p.x,y-p.y);}
		point operator*(const double a){return point(x*a,y*a);}
		point operator/(const double a){return point(x/a,y/a);}

		static double dot(const point &p1,const point &p2){
			return p1.x*p2.x+p1.y*p2.y;
		}

		double norm(){
			return x*x+y*y;
		}

		double abs(){
			return sqrt(norm());
		}

		static double cross(point p1,point p2){
			return p1.x*p2.y-p1.y*p2.x;
		}

		static int ccw(point p0,point p1,point p2){
			point a=p1-p0; // ??????p0p1
			point b=p2-p0; // ??????p0p2
			if(cross(a,b)>EPS) return COUNTER_CLOCKWISE; // a????????????b??????????¨?
			if(cross(a,b)<-EPS) return CLOCKWISE; // a????????????b???????¨?
			if(dot(a,b)<-EPS) return ONLINE_BACK; // p2-p0-p1???????????¢???
			if(a.norm(),b.norm()) return ONLINE_FRONT; // p0-p1-p2???????????¢???
			return ON_SEGMENT; // p0-p2-p1???????????¢???
		}
};

int main(void){
	double x,y;
	while(cin>>x>>y){
		int rcw=0;
		int cw=0;
		point a(x,y);
		cin>>x>>y;
		point b(x,y);
		cin>>x>>y;
		point c(x,y);
		cin>>x>>y;
		point d(x,y);
		switch(point::ccw(a,b,d)){
			case point::COUNTER_CLOCKWISE:rcw++;break;
			case point::CLOCKWISE:cw++;break;
		}
		switch(point::ccw(b,c,d)){
			case point::COUNTER_CLOCKWISE:rcw++;break;
			case point::CLOCKWISE:cw++;break;
		}
		switch(point::ccw(c,a,d)){
			case point::COUNTER_CLOCKWISE:rcw++;break;
			case point::CLOCKWISE:cw++;break;
		}
		if(rcw==1&&cw==2)cout<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
}