#include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<queue>
#include<map>
#include<set>
#include<vector>
#include<list>
#include<stack>
#include<cstring>
#include<string>
#include<cmath>
using namespace std;
#define EPS 0.00000000001

struct Line{
	double x[2],y[2];
};

int main(){
	Line l[2];
	while(true){
		for(int i=0;i<2;i++){
			for(int j=0;j<2;j++){
				if(!(cin>>l[i].x[j]>>l[i].y[j])){
					return 0;
				}
			}
		}
		double a,b;
		bool flag=false,ans;
		if(l[0].x[0]==l[0].x[1]){
			swap(l[0],l[1]); flag = true;
		}
		if(l[1].y[0]==l[1].y[1]){
			if(flag){
				ans = false; goto OUT;
			}
			swap(l[0],l[1]);
		}
		a = (l[0].y[1]-l[0].y[0])/(l[0].x[1]-l[0].x[0]);
		b = -(l[1].x[1]-l[1].x[0])/(l[1].y[1]-l[1].y[0]);
		if(abs(a-b)<EPS) ans = true;
		else ans = false;
		OUT:
		if(ans) puts("YES");
		else puts("NO");
	}
}