#include<iostream>
#include<algorithm>
using namespace std;
typedef long double LD;

int main() {
	LD a, b, c, d, e, f, g, h;
	while (cin >> a >> b >> c >> d >> e >> f >> g >> h) {
		LD i = (g - e)*(d - b);
		LD j = (c - a)*(h - f);
		if (i*j==-1)cout << "YES" << endl;
		else {
			if (a - c == 0 && f - h == 0)cout << "YES" << endl;
			else if (b - d == 0 && e - g == 0)cout << "YES" << endl;
			else cout << "NO" << endl;
		}
	}
	return 0;
}