#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
typedef complex<double> xy_t;

double x[4], y[4];

double dot_product(xy_t a, xy_t b)
{
    return (conj(a) * b).real();
}

double cross_product(xy_t a, xy_t b)
{
    return (conj(a) * b).imag();
}

int main()
{
    while (true)
    {
        rep(i, 4) cin >> x[i] >> y[i];
        if (!cin)
            break;
        xy_t a(x[0], y[0]), b(x[1], y[1]), c(x[2], y[2]), p(x[3], y[3]);
        double pab = cross_product(a - p, b - p), pbc = cross_product(b - p, c - p), pca = cross_product(c - p, a - p);
        bool ok = pab * pbc > 0 && pbc * pca > 0;
        cout << (ok ? "YES" : "NO") << endl;
    }
    return 0;
}
