#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

template <typename T>
double angle(pair<T, T> a, pair<T, T> b) {
    double costheta = (a.first*b.first + a.second*b.second)/(sqrt(a.first*a.first+a.second*a.second)*sqrt(b.first*b.first+b.second*b.second));
    double ang = acos(costheta);
    while (ang >= M_PI) {
        ang -= M_PI;
    }
    return ang;
}

template <typename T>
double norm(pair<T, T> a) {
    return sqrt(a.first*a.first + a.second*a.second);
}


int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    vector<string> anslist;

    double x1, y1, x2, y2, x3, y3, xp, yp;
    while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp) {
        pair<double, double> a, b, p;
        a.first = x2 - x1;
        a.second = y2 - y1;
        b.first = x3 - x1;
        b.second = y3 - y1;
        p.first = xp - x1;
        p.second = yp - y1;
        double theta = angle(a, b);
        double phi = angle(a, p);
        double psi = angle(b, p);
        
        if (norm(p) > norm(a) || norm(p) > norm(b)) {
            anslist.push_back("NO");
            break;
        }
        if (phi > theta || psi > theta) {
            anslist.push_back("NO");
            break;
        }
        anslist.push_back("YES");
    }

    for(auto ans : anslist) {
        cout << ans << endl;
    }

    return 0;
}