#include<iostream>
using namespace std;
#include<stdio.h>

float arean(float x1,float y1,float x2,float y2,float x3,float y3)
{
    float a;
    return a=(x3*(y1-y2)+x1*(y2-y3)+x2*(y3-y1))/2;

}
int main()
{
    float x1,y1,x2,y2,x3,y3,px,py,b,a1,a2,a3;
    freopen("in.txt","r",stdin);
   while(scanf("%d%d%d%d%d%d%d%d",&x1,&y1,&x2,&y2,&x3,&y3,&px,&py)!=EOF)
   {
   cin>>x1>>y1>>x2>>y2>>x3>>y3>>px>>py;

        b=arean(x1,y1,x2,y2,x3,y3);

        a1=arean(x1,y1,x2,y2,px,py);

        a2=arean(px,py,x2,y2,x3,y3);

        a3=arean(x1,y1,x3,y3,px,py);
        if(b==a1+a2+a3)
        cout<<"YES";
        else
        cout<<"NO";

        cout<<endl;
   }





return 0;
}