#include<cstdio>
#include<cmath>
 
//#include<iostream>
using namespace std;
 
int main(){
    float  x1, y1, x2, y2, x3, y3, xp, yp;
	float  xa, ya, xb, yb, xc, yc, k;

	while( ~scanf("%f%f%f%f%f%f%f%f" , &x1, &y1, &x2, &y2, &x3, &y3, &xp, &yp)){
		xa=x2-x1; ya=y2-y1;
		xb=x3-x1; yb=y3-y1;
		xc=xp-x1; yc=yp-y1;

		if(xa-xb) 	k=(xc-xb)/(xa-xb);
		else		k=(yc-yb)/(ya-yb);	

		if (0<k && k<1) printf("YES\n");
		else		printf("NO\n");
	}

    return 0;
}