#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
	double xa,ya,xb,yb,xc,yc,xd,yd,angle1,angle2;
	while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF)
	{
		angle1=angle2=0.0;
		if(xa!=xb&&xc!=xd&&ya!=yb&&yc!=yd)
		{
			angle1=(yb-ya)/(xb-xa);
			angle2=(yd-yc)/(xd-xc);
			if(angle1*angle2==-1)
			{
				cout << "YES" << endl;
			}
			else
			{
				cout << "NO" << endl;
			}
		}
		else if(xa==xb&&yc==yd)
		{
			cout << "YES" << endl;
		}
		else if(xc==xd&&ya==yb)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
	return 0;
}