#include <stdio.h>
#include <iostream>

using namespace std;

int main() {
	double xa,xb,xc,xd,ya,yb,yc,yd;
	double becax,becay,becbx,becby;
	double naiseki;

	while (cin >> xa >> ya >> xb >> yb >> xc >> yc >> xd >> yd) {
		becax = xb - xa;
		becay = yb - ya;
		becbx = xd - xc;
		becby = yd - yc;
		naiseki = becax * becbx + becay * becby;
		if (naiseki == 0 && (becax != 0 || becay != 0) && (becbx != 0 || becby != 0)) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}