#include <iostream>
#include <cstdio>

using namespace std;

#define FOR(i,a,b) for(int i =(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

int main() {
	float x[4], y[4];
	bool flag;

	while (cin>>x[0]>>y[0]>>x[1]>>y[1]>>x[2]>>y[2]>>x[3]>>y[3] != NULL) {
		flag = false;
		REP(i,2) {
			if (x[i*2+1] == x[i*2] && y[((i+1)*2+1)%4] == y[((i+1)*2)%4])
				flag = true;
		}
		if (!flag && (y[1]-y[0])/(x[1]-x[0])*(y[3]-y[2])/(x[3]-x[2]) == -1)
			flag = true;

		if (flag)
			printf("YES\n");
		else
			printf("NO\n");
	}
	return 0;
}