require 'scanf'
require 'matrix'

while str = STDIN.gets
    x1,y1,x2,y2,x3,y3,xp,yp=\
        str.scanf("%f %f %f %f %f %f %f %f") 
    v1=Vector[x2-x1,y2-y1]
    v2=Vector[x3-x1,y3-y1]
    vp=Vector[xp-x1,yp-y1]
    mat=Matrix[v1,v2]
    ans=Matrix[vp]/mat
    if 0<ans[0,0] and ans[0,0]<1.0 and \
        0<ans[0,1] and ans[0,1]<1.0 then
        print "YES\n"
    else
        print "NO\n"
    end
end