#include <iostream>
#include <math.h>
using namespace std;

double length(double, double, double, double);

double triangle(double x1, double y1, double x2, double y2, double x3, double y3) {
    double a = length(x1, y1, x3, y3);
    double b = length(x2, y2, x3, y3);
    double c = length(x1, y1, x2, y2);

    double d = (a + b - c) / sqrt(a * b) / 2.0; // cos(radian)

    // cout << d << endl;

    return d;
}

double length(double x, double y, double ox, double oy) {
    return pow(x - ox, 2) + pow(y - oy, 2);
}

int main() {
    double x1, y1, x2, y2, x3, y3, xp, yp;

    while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
        double ta = triangle(x1, y1, x2, y2, xp, yp);
        double tb = triangle(x1, y1, x3, y3, xp, yp);
        double tc = triangle(x2, y2, x3, y3, xp, yp);

        if (ta < 0 && tb < 0 && tc < 0) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }

        if (cin.eof()) break;
    }

    return 0;
}