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

typedef complex<double> Point;

double cross(Point a, Point b){
//    return (conj(a)*b).imag();
    return a.real() * b.imag() - a.imag() * b.real();
}

int main(){
    Point V[3], P;
    while(true){
        for(int i=0; i<3; i++){
            double x, y;
            if(!(cin >> x >> y))
                return 0;
            V[i] = {x, y};
        }
        double x, y; cin >> x >> y;
        P = {x, y};
        
        int sum1 = 0, sum2 = 0;
        for(int i=0; i<3; i++){
            double x = cross(V[(i+1)%3]-V[i], (P-V[i]));
            sum1 += x<0;
            sum2 += x>0;
        }
        cout << (sum1==3 || sum2==3? "YES": "NO") << endl;
    }
    return 0;
}

