#include<bits/stdc++.h>
#define EPS 1.0e-9
using namespace std;

bool is_in_a_triangle(double ax, double ay, double bx, double by, double cx, double cy, double px, double py){
    double c1 = (bx-ax) * (py-ay) - (by-ay) * (px-ax);
    double c2 = (cx-bx) * (py-by) - (cy-by) * (px-bx);
    double c3 = (ax-cx) * (py-cy) - (ay-cy) * (px-cx);
    if(c1 + EPS > 0 && c2 + EPS > 0 && c3 + EPS > 0) return true;
    else if(c1 + EPS < 0 && c2 + EPS < 0 && c3 + EPS < 0) return true;
    else return false;
}

int 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){
        if(is_in_a_triangle(x1,y1,x2,y2,x3,y3,xp,yp))cout << "YES" << endl;
        else cout << "NO" << endl;
    }

    return 0;
}
