import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

alias real F;

F cross(F x1, F y1, F x2, F y2)
{
    return x1*y2-y1*x2;
}

void main()
{
    foreach(s;stdin.byLine())
    {
        auto m = s.split().map!(to!F);
        immutable x1=m[0], y1=m[1], x2=m[2], y2=m[3], x3=m[4], y3=m[5], xp=m[6], yp=m[7];
        immutable c1 = cross(x2-x1,y2-y1,xp-x1,yp-y1);
        immutable c2 = cross(x3-x2,y3-y2,xp-x2,yp-y2);
        immutable c3 = cross(x1-x3,y1-y3,xp-x3,yp-y3);
        writeln((c1>=0&&c2>=0&&c3>=0)||(c1<=0&&c2<=0&&c3<=0)?"YES":"NO");
    }
}