#include<iostream>
#include<cmath>
using namespace std;
typedef double dbl;
dbl x[4], y[4], k[2];

int main() {
	while (cin >> x[0] >> y[0]) {
		int ans = 0;
		for (int i = 1; i <= 3; i++) cin >> x[i] >> y[i];
		k[0] = x[1] - x[0]; k[1] = x[3] - x[2];
		if (k[0] == 0) {
			if (y[3] == y[2]) ans++;
		}
		else if (k[1] == 0) {
			if (y[1] == y[0]) ans++;
		}
		else {
			k[0] = (y[1] - y[0]) / k[0]; k[1] = (y[3] - y[2]) / k[1];
			if (fabs(k[0] * k[1] + 1) < 1e-10) ans++;
		}
		if (ans) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}
