#include<iostream>
using namespace std;
struct Coordinate {//???
	double x;
	double y;
};
struct line {//???
	double k;
	double p;
};
line twopoint(Coordinate a, Coordinate b) {
	/* don't use if a.x == b.x */
	line l;
	l.k = (b.y - a.y) / (b.x - a.x);
	l.p = (l.k*a.x) - a.y;
	return l;
}
int main() {
	Coordinate a, b, c, d;
	while (cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y){
		bool b00l;
		if (a.x == b.x) if (c.y == d.y)b00l = true; else b00l = false;
		if (c.x == d.x) if (a.y == b.y)b00l = true; else b00l = false;
		else{
			line l1 = twopoint(a, b);
			line l2 = twopoint(c, d);
			if (l1.k*l2.k == -1)b00l = true; else b00l = false;
		}
		if (b00l)cout << "YES\n"; else cout << "NO\n";
	}
	return 0;
}