#include<iostream>
using namespace std;
int main() {
	double xa, xb, xc, xd, ya, yb, yc, yd;
	while (cin >> xa >> ya >> xb >> yb >> xc >> yc >> xd >> yd) {
		if (xa == xb) {
			if (yc == yd)cout << "YES\n";
			else cout << "NO\n";
		}
		else if (xc == xd) {
			if (ya == yb)cout << "YES\n";
			else cout << "NO\n";
		}
		else if (ya == yb || yc == yd)cout << "NO\n";
		else {
			double ab = (ya - yb) / (xa - xb);
			double cd = (yc - yd) / (xc - xd);
			if (ab*cd == -1)cout << "YES\n";
			else cout << "NO\n";
		}
	}
}