#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<cstring>
using namespace std;
//long long int arr[1000000];
int main()
{
    double x1,x2,x3,y1,y2,y3,p,q,a1,a2,a3,at;
    while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&p,&q)==8)
    {
        at=((x1-x2)*(y2-y3)-(y1-y2)*(x2-x3));
        a1=((p-x2)*(y2-y3)-(q-y2)*(x2-x3));
        a2=((x1-p)*(q-y3)-(y1-q)*(p-x3));
        a3=((x1-x2)*(y2-q)-(y1-y2)*(x2-p));
        if((at)==(a1+a2+a3))
        printf("YES\n");
        else
        printf("NO\n");
    }
    return 0;
}