#include<cstdio>
#include<cstring>
#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
int CCross(double x1,double y1,double x2,double y2,double x3,double y3,double x4,double y4){
	double S,T,D;	//	一時変数を宣言

	//	分母を先に計算。計算量を減らすため、分子は後で行う。
	D = (x3-x1) * (y4-y1) - (y3-y1) * (x4-x1);
	
	//	D の符号に応じて分岐
	if(D < 0){
	  S = (y4-y1)*(x2-x1) - (x4-x1)*(y2-y1);
	  T = (x3-x1)*(y2-y1) - (y3-y1)*(x2-x1);
	  
	  return S <= 0 && T <= 0 && (S+T)/D >= 1 ;
	}
	else if(D > 0){
	  S = (y4-y1)*(x2-x1) - (x4-x1)*(y2-y1);
	  T = (x3-x1)*(y2-y1) - (y3-y1)*(x2-x1);
	    
	    return S >= 0 && T >= 0 && (S+T)/D >= 1 ;
	}
	
	//	D = 0 の時には、点が線分の上かどうかを判定する。
	return (x3-x1)*(x4-x1)+(y3-y1)*(y4-y1) <= 0
	  || (x3-x2)*(x4-x2)+(y3-y2)*(y4-y2) <= 0
	  || (x1-x3)*(x2-x3)+(y1-y3)*(y2-y3) <= 0;
}
double GetLen(double x1,double y1,double x2,double y2){
  double X1=min(x2,x1),X2=max(x2,x1);
  double Y1=min(y2,y1),Y2=max(y2,y1);
  return sqrt((Y2-Y1)*(Y2-Y1)+(X2-X1)*(X2-X1));
}
main(){
  double x1,y1,x2,y2,x3,y3,xp,yp; 
  while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp)!=EOF){
    double R;
    double a,b,c;
    a=GetLen(x1,y1,x2,y2);
    b=GetLen(x2,y2,x3,y3);
    c=GetLen(x3,y3,x1,y1);
    if(CCross(x1,y1,xp,yp,x2,y2,x3,y3) ||
       CCross(x2,y2,xp,yp,x3,y3,x1,y1) ||
       CCross(x3,y3,xp,yp,x1,y1,x2,y2) ){
       printf("NO\n");
    }
    else printf("YES\n");
  }
}