#include <cstdio>
#define LOOP(index,times) for(int index=0;index<times;index++)
using namespace std;

int main(){

float x[3],y[3],xp,yp,detA,s,t;

while(scanf("%f %f %f %f %f %f %f %f",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&xp,&yp) != EOF){

detA=(x[2]-x[0])*(y[1]-y[0])-(x[1]-x[0])*(y[2]-y[0]);
s=((y[1]-y[0])*(xp-x[0])-(x[1]-x[0])*(yp-y[0]))/detA;
t=(-(y[2]-y[0])*(xp-x[0])+(x[2]-x[0])*(yp-y[0]))/detA;

if(0 < s && s < 1 && 0 < t && t < 1)
	printf("YES\n");
else
	printf("NO\n");

}
return 0;		
}