
def a ( x1, y1, x2, y2, xp, yp )
    (x2-x1)*(yp-y1) - (y2-y1)*(xp-x1) 
end

while gets
    x1, y1, x2, y2, x3, y3, xp, yp = $_.chomp.split.map(&:to_f)
    puts ([[x1,y1], [x2,y2], [x3,y3]].permutation(3).to_a.map {|k, l, m| a(k[0],k[1],l[0],l[1],xp,yp) * a(k[0],k[1],l[0],l[1],m[0],m[1]) > 0}.uniq==[true])?"YES":"NO"
end
    