#include <iostream>
#include <string>
using namespace std;

int main(){
double x1;
double y1;
double x2;
double y2;
double x3;
double y3;
double xp;
double yp;
while(cin >> x1){
cin >> y1;
cin >> x2;
cin >> y2;
cin >> x3;
cin >> y3;
cin >> xp;
cin >> yp;
double x4;
double x5;
double x6;
double x7;
double x8;
int a;
a=0;

x4=(y2-y1)*(x3-xp)-(y3-yp)*(x2-x1);
x7=y2*x1-x2*y1;
x8=y3*xp-x3*yp;
x5=x7*(x3-xp)-x8*(x2-x1);
x6=x5/x4;

if((x2-x6)*(x6-x1)>0){a=a+1;}
if((x3-xp)*(xp-x6)>0){a=a+1;}
if(a==2){cout <<"YES"<<endl;}
if(a!=2){cout <<"NO"<<endl;}

}

}