while gets
    xa,ya,xb,yb,xc,yc,xd,yd=$_.chomp.split(nil).map(&:to_f)
    xab=xb-xa;yab=yb-ya
    xcd=xd-xc;ycd=yd-yc
    if((xab*xcd+yab*ycd).abs<=1e-10)
        puts "YES"
    else
        puts "NO"
    end
end