#include <iostream>
#include <complex>
#include <vector>
#include <algorithm>
#include <assert.h>
using namespace std;
struct P{double x,y;};
int main(){
	P d[4];
	while(cin >> d[0].x >> d[0].y){
		for(int i = 1 ; i < 4 ; i++){
			cin >> d[i].x >> d[i].y;
		}
		double a=0,b=0;
		if(d[0].x == d[1].x){
			cout << (d[2].y == d[3].y?"YES":"NO") << endl;
		}else if(d[2].x == d[3].x){
		cout << (d[0].y == d[1].y?"YES":"NO") << endl;
		}else{
			a = (d[0].y-d[1].y)/(d[0].x-d[1].x);
			b = (d[2].y-d[3].y)/(d[2].x-d[3].x);
			cout << (a*b == -1.0?"YES":"NO") << endl;
		}
	}
};