#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
#define int long long
#define DFZERO 1E-13
signed main(){
	double x1,y1,x2,y2,x3,y3,x4,y4;
	while( scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4) != EOF ){
		double xa = x2-x1, ya = y2-y1;
		double xb = x4-x3, yb = y4-y3;
		if( abs(xa*xb+ya*yb)/sqrt(xa*xa+ya*ya)/sqrt(xb*xb+yb*yb) < DFZERO) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}