#include <iostream>
#include <cmath>
#include <complex>
using namespace std;

typedef double D;
typedef complex<D> P;

D cross(P x, P y){return imag(conj(x)*y);}

bool triContain(P a, P b, P c, P p){
    P ab = b - a;
    P ap = p - a;
    P bc = c - b;
    P bp = p - b;
    P ca = a - c;
    P cp = p - c;
    if(cross(ab, ap) > 0 && cross(bc, bp) > 0 && cross(ca, cp) > 0)return true;
    if(cross(ab, ap) < 0 && cross(bc, bp) < 0 && cross(ca, cp) < 0)return true;
    return false;
}

int main(){

   D ax, ay, bx, by, cx, cy, px, py;
   while(cin>>ax>>ay>>bx>>by>>cx>>cy>>px>>py){
       P a(ax, ay), b(bx, by), c(cx, cy), p(px, py);
       if(triContain(a, b, c, p))cout<<"YES"<<endl;
       else cout<<"NO"<<endl;
   }

    return 0;
}
