#include <stdio.h>
#include<math.h>
#include <algorithm>

#define EPS 1e-10

using namespace std;


int main(){
	double x1,x2,x3,x4,y1,y2,y3,y4,slope1,slope2;

	while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4) != EOF){
		if(x1 == x2){
			if(y3 == y4)printf("YES\n");
			else{
				printf("NO\n");
			}
		}else{ //x1 != x2
			if(x3 == x4){
				if(y1 == y2)printf("YES\n");
				else{
					printf("NO\n");
				}
			}else{
				slope1 = (double)((y2-y1)/(x2-x1));
				slope2 = (double)((y4-y3)/(x4-x3));
				if(fabs(slope1*slope2 + 1) < EPS){
					printf("YES\n");
				}else{
					printf("NO\n");
				}
			}
		}
	}

    return 0;
}