def outerProduct(ax, ay, bx, by)
    return ax * by - bx * ay
end
    while l = gets
    x1, y1, x2, y2, x3, y3, px, py = l.split.map(&:to_f)
    #p x1, y1, x2, y2, x3, y3, px, py
    
    z1 = outerProduct((x2-x1), (y2-y1), (px-x1), (py-y1))
    z2 = outerProduct((x3-x2), (y3-y2), (px-x2), (py-y2))
    z3 = outerProduct((x1-x3), (y1-y3), (px-x3), (py-y3))
    
    if (z1 > 0 && z2 > 0 && z3 > 0) || (z1 < 0 && z2 < 0 && z3 < 0)
        puts "YES"
    else
        puts "NO"
    end
end
