#include<stdio.h>
int main(){
	double x1,x2,x3,y1,y2,y3,xo,yo;
    double a,b,c;
 
    while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&xo,&yo)!=EOF){
        a = (x2-x1)*(yo-y1)-(y2-y1)*(xo-x1);
        b = (x3-x2)*(yo-y2)-(y3-y2)*(xo-x2);
        c = (x1-x3)*(yo-y3)-(y1-y3)*(xo-x3);
        if((a>0&&b>0&&c>0) || (a<0&&b<0&&c<0)){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
    return 0;
}
