/*#include <iostream>
using namespace std;

int main(){
	double a[8];
	while(cin >>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]>>a[6]>>a[7]){
		if((a[3]-a[1])*(a[7]-a[5])==-1*(a[2]-a[0])*(a[6]-a[4]))cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}*/
#include <iostream>
#include <math.h>
using namespace std;
int main(){
    double xa,ya,xb,yb,xc,yc,xd,yd;
    int a;
    while(cin>>xa>>ya>>xb>>yb>>xc>>yc>>xd>>yd){
        if(xa==xb){
            if(yc==yd) a=1;
            else a=2;
        }else if(xc==xd){
            if(ya==yb) a=1;
            else a=2;
        }else{
            double l=(yb-ya)/(xb-xa);
            double m=(yd-yc)/(xd-xc);
            if(fabs(l*m+1)<0.000001) a=1;
            else a=2;
        }
        switch(a){
        case 1:
            cout<<"YES"<<endl;
            break;
        case 2:
            cout<<"NO"<<endl;
            break;
        }
    }
    return 0;
}