#include <stdio.h>
#define line(x1,y1,x2,y2,x3,y3,c) c == '>' ? y3 > (1 / (x1 - x2)) * ((y1 - y2) * x3 + x1 * y2 - x2 * y1):(c == '<' ? y3 < (1 / (x1 - x2)) * ((y1 - y2) * x3 + x1 * y2 - x2 * y1) : 0)

int main(void){
	double x[3], y[3], xp, yp, tmpx, tmpy;
	int i;
	for(i = 0;i < 3;i++)
		scanf("%lf%lf",&x[i],&y[i]);
	scanf("%lf%lf",&xp,&yp);
	if(x[0] < x[1]){
		tmpx = x[0];
		tmpy = y[0];
		x[0] = x[1];
		y[0] = y[1];
		x[1] = tmpx;
		y[1] = tmpy;
	}
	if(line(x[0],y[0],x[1],y[1],x[2],y[2],'>') && line(x[0],y[0],x[1],y[1],xp,yp,'>')){
		if(x[2] > x[0]){
			if(line(x[0],y[0],x[2],y[2],xp,yp,'>') && line(x[1],y[1],x[2],y[2],xp,yp,'<'))
				printf("YES\n");
			else
				printf("NO\n");
		}else if(x[2] == x[0]){
			if(x[2] > xp && y[2] > yp && line(x[1],y[1],x[2],y[2],xp,yp,'<'))
				printf("YES\n");
			else
				printf("NO\n");
		}else if(x[2] > x[1]){
			if(line(x[0],y[0],x[2],y[2],xp,yp,'<') && line(x[1],y[1],x[2],y[2],xp,yp,'<'))
				printf("YES\n");
			else
				printf("NO\n");
		}else if(x[2] == x[1]){
			if(x[2] > xp && y[2] > yp && line(x[0],y[0],x[2],y[2],xp,yp,'<'))
				printf("YES\n");
			else
				printf("NO\n");
		}else if(x[2] < x[1]){
			if(line(x[0],y[0],x[2],y[2],xp,yp,'<') && line(x[1],y[1],x[2],y[2],xp,yp,'>'))
				printf("YES\n");
			else
				printf("NO\n");
		}
	}
	else if(line(x[0],y[0],x[1],y[1],x[2],y[2],'<') && line(x[0],y[0],x[1],y[1],xp,yp,'<')){
		if(x[2] > x[0]){
			if(line(x[0],y[0],x[2],y[2],xp,yp,'<') && line(x[1],y[1],x[2],y[2],xp,yp,'>'))
				printf("YES\n");
			else
				printf("NO\n");
		}else if(x[2] == x[0]){
			if(x[2] > xp && y[2] < yp && line(x[1],y[1],x[2],y[2],xp,yp,'>'))
				printf("YES\n");
			else
				printf("NO\n");
		}else if(x[2] > x[1]){
			if(line(x[0],y[0],x[2],y[2],xp,yp,'>') && line(x[1],y[1],x[2],y[2],xp,yp,'>'))
				printf("YES\n");
			else
				printf("NO\n");
		}else if(x[2] == x[1]){
			if(x[2] > xp && y[2] < yp && line(x[0],y[0],x[2],y[2],xp,yp,'>'))
				printf("YES\n");
			else
				printf("NO\n");
		}else if(x[2] < x[1]){
			if(line(x[0],y[0],x[2],y[2],xp,yp,'>') && line(x[1],y[1],x[2],y[2],xp,yp,'<'))
				printf("YES\n");
			else
				printf("NO\n");
		}
	}
	else
		printf("NO\n");
	return 0;
}