#include<iostream>
using namespace std;

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