#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

using namespace std;

double distance(double x1, double y1, double x2, double y2,
                double xp, double yp){
    if(x1 == x2) {
        return abs(xp - x1);
    } else {
        double a = ( y2 - y1 ) / ( x2 - x1 );
        double b = y1 - a * x1;
        return abs(a*xp-yp-b) / sqrt(1+a*a);
    }
}

int main(){
    vector<double> p(6);
    double xp, yp;
    while(cin >> p[0] >> p[1] >> p[2] >> p[3] >> p[4] >> p[5] >> xp >> yp){
        bool yes = true;
        for(int i = 0; i < 3; i++){
            double d1 = distance(p[0], p[1], p[2], p[3], p[4], p[5]);
            double d2 = distance(p[0], p[1], p[2], p[3], xp, yp);
            yes &= d2 < d1;
            rotate(p.begin(), p.begin()+2, p.end());
        }
        cout << (yes ? "YES" : "NO") << endl;
    }
}