#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;

template <typename T>
struct Vec2;

template <typename T>
T SqrMagnitude(const Vec2<T>& v);

template <typename T>
T Magnitude(const Vec2<T>& v);

template <typename T>
T Dot(const Vec2<T>& v1, const Vec2<T>& v2);


template <typename T>
struct Vec2 {
    T x, y;
    Vec2() = default;
    Vec2(T in_x, T in_y)
        : x {in_x}, y {in_y} {};
    Vec2(const Vec2&) = default;
    Vec2(Vec2&&) = default;

    Vec2 normalized() const{
        T mag = Magnitude(*this);
        return {x / mag, y / mag};
    }

    Vec2 normalize() {
        T mag = Magnitude(*this);
        return {x /= mag, y /= mag};
    }

    Vec2 operator-() {
        return {-x, -y};
    }

    Vec2 operator+(const Vec2& rhs) const{
        return {x + rhs.x, y + rhs.y};
    }

    Vec2 operator-(const Vec2& rhs) const{
        return {x - rhs.x, y - rhs.y};
    }

    Vec2 operator*(T rhs) const{
        return {x * rhs, y * rhs};
    }

    Vec2 operator/(T rhs) const{
        return {x / rhs, y / rhs};
    }

    Vec2& operator+=(const Vec2& rhs) {
        x += rhs.x;
        y += rhs.y;
        return *this;
    }

    Vec2& operator-=(const Vec2& rhs) {
        x -= rhs.x;
        y -= rhs.y;
        return *this;
    }

    Vec2& operator*=(T rhs) {
        x *= rhs;
        y *= rhs;
        return *this;
    }

    Vec2& operator/=(T rhs) {
        x /= rhs;
        y /= rhs;
        return *this;
    }
};

template <typename T>
inline Vec2<T> operator*(T s, const Vec2<T>& v) {
    return {s * v.x, s * v.y};
}


template <typename T>
inline T SqrMagnitude(const Vec2<T>& v) {
    return Dot(v, v);
}

template <typename T>
inline T Magnitude(const Vec2<T>& v) {
    return sqrt(SqrMagnitude(v));
}

template <typename T>
inline T Dot(const Vec2<T>& v1, const Vec2<T>& v2) {
    return v1.x * v2.x + v1.y * v2.y;
}

template <typename T>
inline T Cross(const Vec2<T>& v1, const Vec2<T>& v2) {
    return v1.x * v2.y - v1.y *v2.x;
}

int main() {
    Vec2<double> p0, p1, p2, q;


    while(cin >> p0.x >> p0.y >> p1.x >> p1.y >> p2.x >> p2.y >> q.x >> q.y) {
        auto v_qp0 = p0 - q;
        auto v_qp1 = p1 - q;
        auto v_qp2 = p2 - q;

        double c0 = Cross(v_qp0, v_qp1);
        double c1 = Cross(v_qp1, v_qp2);
        double c2 = Cross(v_qp2, v_qp0);

        cout << ((c0 > 0 && c1 > 0 && c2 > 0) || (c0 < 0 && c1 < 0 && c2 < 0) ? "YES" : "NO") << endl;
    }
        
        
    

    return 0;
}