#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

int main(){
    double x1, x2, x3, y1, y2, y3, xp, yp;
    while (cin>>x1>>y1>>x2>>y2>>x3>>y3>>xp>>yp){
        double v1, v2, v3;
        v1 = (x1-x2)*(y1-yp) - (y1-y2)*(x1-xp);
        v2 = (x2-x3)*(y2-yp) - (y2-y3)*(x2-xp);
        v3 = (x3-x1)*(y3-yp) - (y3-y1)*(x3-xp);
        //printf("%f %f %f\n", v1, v2, v3);
        if ( (v1 < 0 && v2 < 0 && v3 < 0) || (v1 > 0 && v2 > 0 && v3 > 0) ) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}
