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

typedef complex<double> Point;

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

int main(){
    Point V[3], P;
    while(!cin.eof()){
        for(int i=0; i<3; i++){
            double x, y; cin >> x >> y;
            V[i] = {x, y};
        }
        double x, y; cin >> x >> y;
        P = {x, y};
        
        int sum = 0;
        for(int i=0; i<3; i++){
            double a = cross(V[(i+1)%3]-V[i], (P-V[i]));
            sum += a/abs(a);
        }
        cout << (abs(sum) == 3? "YES": "NO") << endl;
    }
    return 0;
}

