#include <stdio.h>
#include <math.h>

using namespace std;

//I searched this method by WEB.

int main(){
	double x1,x2,x3,y1,y2,y3,xp,yp;
	double calc1,calc2,calc3;

	while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp)!=EOF){
		calc1 = (x1-xp)*(y2-yp)-(y1-yp)*(x2-xp);

		calc2 = (x3-xp)*(y1-yp)-(y3-yp)*(x1-xp);

		calc3 = (x2-xp)*(y3-yp)+(y2-yp)*(x2-xp);

		if((calc1>0&&calc2>0&&calc3>0) || (calc1<0&&calc2<0&&calc3<0)){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
    return 0;
}