#include <stdio.h> 
int main(){ 
double a,b,c,d,e,f,g,h; 
while(scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f,&g,&h)!=EOF){
 double x1=a-g,x2=c-e,x3=c-g,x4=a-e; 
double y1=b-h,y2=d-f,y3=d-h,y4=b-f; 
if(x1*x1+y1*y1+x2*x2+y2*y2==x3*x3+y3*y3+x4*x4+y4*y4){printf("YES\n");}else{printf("NO\n");} }
 return 0; 
}