#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,b) FOR(i,0,b)
#define BE(c) c.begin(),c.end()
#define PB push_back
#define F first
#define S second
#define BEB(s) s
using namespace std;
int main(){
	double a,aa,b,bb,c,cc,d,dd,ab,cd;
	while(cin>>a>>aa>>b>>bb>>c>>cc>>d>>dd){
		if((a==b&&cc==dd)||(c==d&&aa==bb))cout<<"YES"<<endl;
		else if(a==b||c==d)cout<<"NO"<<endl;
		else{
			if((aa-bb)*(cc-dd)==-1*(a-b)*(c-d))cout<<"YES"<<endl;
			else cout<<"NO"<<endl;
		}
	}
	return 0;
}