#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(p[0].first == p[1].first && p[2].first == p[3].first)
		{
			cout << "NO" << endl;
		}
		else if(p[0].first == p[1].first && p[2].second == p[3].second || p[0].second == p[1].second && p[2].first == p[3].first)
		{
			cout << "YES" << endl;
		}
		else
		{
			double slope1 = (p[1].second - p[0].second) / (p[1].first - p[0].first);
			double slope2 = (p[3].second - p[2].second) / (p[3].first - p[2].first);
			if(slope1 * slope2 + 1 < 1e-6)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
	}
}

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