#include <iostream>
using namespace std;
 
int main(){
    double xa, ya,xb, yb,xc, yc,xd, yd;
    while(cin >> xa >> ya >> xb >> yb  >> xc >> yc >> xd>>yd){
        double dx1 = xb - xa, dy1 = yb - ya;
        double dx2 = xd - xc, dy2 = yd - yc;
        if(dx1 * dx2 + dy1 * dy2 <=1e-10){
            cout << "YES" << endl;
        } else {
            cout <<"NO" << endl;
        }
    }
    return 0;
}