#include <iostream>
using namespace std;
int main(){
    double x1, y1, x2, y2, x3, y3, xp, yp;
    while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp){

        /*double max_x = x1;
        if(x2 > max_x) max_x = x2;
        if(x3 > max_x) max_x = x3;

        double max_y = y1;
        if(y2 > max_y) max_y = y2;
        if(y3 > max_y) max_y = y3;

        double min_x = x1;
        if(x2 < min_x) min_x = x2;
        if(x3 < min_x) min_x = x3;

        double min_y = y1;
        if(y2 < min_y) min_y = y2;
        if(y3 < min_y) min_y = y3;

        if(xp >= min_x && xp <= max_x && yp >= min_y && yp <= max_y)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;*/
        double a1, b1, a2, b2, A, B;
        a1 = x2 - x1;
        a2 = y2 - y1;
        b1 = x3 - x1;
        b2 = y3 - y1;
        xp = xp - x1;
        yp = yp - y1;
        A = (b1 * yp - b2 * xp) / (a2 * b1 - a1 * b2);
        B = (a2 * xp - a1 * yp) / (a2 * b1 - a1 * b2);
        if(A + B < 1 && A > 0 && B > 0) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
}

