
while gets
    n = $_.split(' ').map(&:to_f)

    f = if n[2] == n[0]
        n[3+4] == n[1+4]
    elsif n[2+4] == n[0+4]
        n[3] == n[1]
    else
        ((n[3]-n[1])/(n[2]-n[0])) * ((n[3+4]-n[1+4])/(n[2+4]-n[0+4])) == -1
    end

    puts (f)?"YES":"NO"
end