/*problem C*/

#include<stdio.h>

typedef struct{
	double x,y;
}point_obj;

int isClossLine(double x1,double y1,double x2,double y2,double x3,double y3,double x4,double y4){
	return ( (x1-x2)*(y3-y1)+(y1-y2)*(x1-x3))*((x1-x2)*(y4-y1)+(y1-y2)*(x1-x4));
}

int main(){
	point_obj p[5];
	int i,j;
	p[3].x=0;
	p[3].y=0;

	
		while(scanf("%lf %lf %lf %lf %lf %lf",p[0].x,p[0].y,p[1].x,p[1].y,p[2].x,p[2].y,p[4].x,p[4].y)){

			p[3].x+=p[0].x;
			p[3].y+=p[0].y;
	
			p[3].x/=3.0;
			p[3].y/=3.0;

			if(isClossLine(p[0].x,p[0].y,p[1].x,p[1].y,p[3].x,p[3].y,p[4].x,p[4].y) > 0 &&
				isClossLine(p[1].x,p[1].y,p[2].x,p[2].y,p[3].x,p[3].y,p[4].x,p[4].y) >0 &&
				isClossLine(p[0].x,p[0].y,p[2].x,p[2].y,p[3].x,p[3].y,p[4].x,p[4].y) > 0){

				printf("YES");
			}

			else{
				printf("NO");
			}
		}


		return 0;
	}