#include <algorithm>
#include <vector>
#include <complex>
using namespace std;
//---------------------------------------------------------------
using Point = complex<double>;
using Polygon = vector<Point>;
double dot(const Point &a, const Point &b) { return real(conj(a) * b); }
double cross(const Point &a, const Point &b) { return imag(conj(a) * b); }
//---------------------------------------------------------------

#include <iostream>
int main() {
    while (true) {
        vector<double> x(4), y(4);
        for (int i = 0; i < 4; i++) { cin >> x[i] >> y[i]; };
        if (!cin) break;
        Point a(x[0], y[0]), b(x[1], y[1]), c(x[2], y[2]), p(x[3], y[3]);
        double s1 = cross(a - p, b - p);
        double s2 = cross(b - p, c - p);
        double s3 = cross(c - p, a - p);
        bool ok = (s1 > 0 && s2 > 0 && s3 > 0) || (s1 < 0 && s2 < 0 && s3 < 0);
        cout << (ok ? "YES" : "NO") << endl;
    }
    return 0;
}
