#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define Cout2(x, y) cout << (x) << " " << (y) << endl
#define dump(x) cerr << #x << " = " << (x) << endl;
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = 1e9;
const double pi = acos(-1.0);

typedef complex<double> CD;
double gosa = 0.0000001;

//直行判定
bool Check_orth(CD p1, CD p2, CD q1, CD q2) {
	double a1 = arg(p1 - p2), a2 = arg(q1 - q2);
	if (a1 > a2)swap(a1, a2);	//a1<a2
	return abs((a2 - a1) - pi / 2.) < gosa || abs((a2 - a1) - (pi / 2. * 3.)) < gosa;
}

int main() {
	double a, b, c, d, e, f, g, h;
	while (cin >> a >> b >> c >> d >> e >> f >> g >> h) {
		CD p1(a, b), p2(c, d), p3(e, f), p4(g, h);
		puts(Check_orth(p1, p2, p3, p4) ? "YES" : "NO");
	}
}
