#include<iostream>
#include<cmath>
using namespace std;

double length( double x1, double y1, double x2, double y2 )
{
    return sqrt( pow(x2-x1,2) + pow(y2-y1,2) );
}

double Surface_Area( double a, double b, double c )
{
    double sin, cos;
    cos = ( a * a - b * b - c * c ) / ( -2 * b * c );
    sin = sqrt( 1 - cos*cos );
    return 0.5 * c * b * sin;
}

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

    //a(x1,y1) b(x2,y2) c(x3,y3) p(xp,yp)
    while( cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> xp >> yp )
    {
        double ab = length( x1, y1, x2, y2 ), bc = length( x2, y2, x3, y3 ), ca = length( x1, y1, x3, y3 );
        double ap = length( x1, y1, xp, yp ), bp = length( x2, y2, xp, yp ), cp = length( x3, y3, xp, yp );

        double s1, s2, s3, s4;
        s1 = Surface_Area( bc, ca, ab );
        s2 = Surface_Area( cp, ca, ap );
        s3 = Surface_Area( bp, cp, bc );
        s4 = Surface_Area( ap, ab, bp );

        if( fabs( s1 - ( s2 + s3 + s4 ) ) < 0.0000001 )         //fabsは絶対値を返す関数
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
}

