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

#define FOR(i, a) for(int i=0;i<(int)a;++i)
typedef long long ll;
typedef long double ld;
using namespace std;

typedef struct point {
    ld x, y;
} POINT;

bool sign(POINT p1, POINT p2, POINT p3) {
    return (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y) > 0;
}

bool pointInTraiangle(POINT x, POINT a, POINT b, POINT c) {
    return sign(x, a, b) && sign(x, b, c) && sign(x, c, a);
}

void solver() {
    ld x1, x2, x3, xp, y1, y2, y3, yp;
    while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
        POINT p1,p2,p3,pp;
        p1.x=x1;p1.y=y1;
        p2.x=x2;p2.y=y2;
        p3.x=x3;p3.y=y3;
        pp.x=xp;pp.y=yp;
        if (pointInTraiangle(pp,p1,p2,p3)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}

int main() {
    solver();
    return 0;
}