#include <iostream>

using namespace std;

typedef struct Point{
	double x,y;
};

int main(){

	Point p[4];
	double x[2],y[2];
	while(cin>>p[0].x){
		cin>>p[0].y;
		for(int i=1;i<4;i++){
			cin>>p[i].x;
			cin>>p[i].y;
		}
		x[0] = p[0].x - p[1].x;
		x[1] = p[2].x - p[3].x;
		y[0] = p[0].y - p[1].y;
		y[1] = p[2].y - p[3].y;
		if(x[0] * x[1] + y[0] * y[1] <=1e-3){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}

	return 0;
}

/*
Sample Input
1.0 1.0 2.0 2.0 0.0 0.0 1.0 -1.0
0.0 0.0 2.0 0.0 -1.0 2.0 2.0 2.0
10.0 6.0 3.4 5.2 6.8 9.5 4.3 2.1
2.5 3.5 2.5 4.5 -3.3 -2.3 6.8 -2.3
Output for the Sample Input
YES
NO
NO
YES
*/