#include <iostream>
#include <cmath>

using namespace std;
typedef pair<double, double> P;

void solve()
{
	P p[4];
	while(cin >> p[0].first >> p[0].second)
	{
		for(int i = 1; i < 4; ++i)
		{
			cin >> p[i].first >> p[i].second;
		}
		if(fabs((p[1].first - p[0].first) * (p[3].first - p[2].first) + (p[1].second - p[0].second) * (p[3].second - p[2].second)) < 1e-12)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}