while gets
    points = $_.split.map(&:to_f).each_slice(2).to_a
    target = points.pop
    points << points[0]
    hoge = points.each_cons(2).map{|u, v|
        x1, y1 = u
        x2, y2 = v
        x3, y3 = target
        ps = (x2 - x1) * (y3 - y1) - (y2 - y1) * (x3 - x1)
    }
    if hoge.all?{|x| x >= 0} || hoge.all?{|x| x <= 0}
        puts 'YES'
    else
        puts 'NO'
    end
end