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

void main(){
    string line;
    while((line = readln).length){
        auto f = line.split.map!(to!real);
        auto ps = [
            f[0] + f[1] * 1.0i,
            f[2] + f[3] * 1.0i,
            f[4] + f[5] * 1.0i,
        ].cycle;
        auto p = f[6] + f[7] * 1.0i;
        real[3] res;
        foreach(i, ref r; res){
            r = cross(ps[i], ps[i+1], p);
        }
        if(res[0]>0&&res[1]>0&&res[2]>0||res[0]<0&&res[1]<0&&res[2]<0)
            "YES".writeln;
        else
            "NO".writeln;
    }
}

real cross(creal a, creal b, creal p)
{
    auto l = b - a, m = p - a;
    return l.re * m.im - l.im * m.re;
}