#include <bits/stdc++.h>

using namespace std;

#define EPS 1e-10

struct Point {
    double x, y;

    Point(){}
    Point(double x, double y) : x(x), y(y) {}
    Point operator - (const Point &p) const {  return Point(x - p.x, y - p.y); }
};

double dot(const Point &a, const Point &b)
{
    return a.x * b.x + a.y * b.y;
}

double cross(const Point &a, const Point &b)
{
    return a.x * b.y - b.x * a.y;
}

double norm(const Point &p){
    return dot(p, p);
}

#define COUNTER_CLOCKWISE +1
#define CLOCKWISE         -1
#define ONLINE_BACK       +2
#define ONLINE_FRONT      -2
#define ON_SEGMENT        +0
typedef Point Vector;

int ccw(const Point &p0, const Point &p1, const Point &p2)
{
    Vector a = p1 - p0;
    Vector b = p2 - p0;
    if (cross(a, b) > EPS)  return COUNTER_CLOCKWISE;
    if (cross(a, b) < -EPS) return CLOCKWISE;
    if (dot(a, b) < -EPS)   return ONLINE_BACK;
    if (norm(a) < norm(b))  return ONLINE_FRONT;
    return ON_SEGMENT; 
}

istream &operator >> (istream &is, Point &p)
{
    return is >> p.x >> p.y;
}

bool in_triangle(Point *p, Point &xp)
{
    int res = 0;
    for (int i = 0; i < 3; i++) {
        res += ccw(xp, p[i], p[(i+1)%3]);
    }
    return (res == -3 || res == 3);
}

int main()
{
    Point p[3], xp;
    while (cin >> p[0] >> p[1] >> p[2] >> xp) {
        cout << (in_triangle(p, xp) ? "YES" : "NO") << endl;
    }
    return 0;
}