#include<iostream>
#include<string.h>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  double xa,xb,xc,xd,ya,yb,yc,yd;

  while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
	      &xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd)!=EOF){

    double vx=xb-xa;
    double vy=yb-ya;
    double ux=xd-xc;
    double uy=yd-yc;

    double product=vx*ux+vy*uy;

    if(vx<EPS){
      if(uy<EPS)
	cout<<"YES"<<endl;
      else 
	cout<<"NO"<<endl;
    }else if(vy<EPS){
      if(ux<EPS)
	cout<<"YES"<<endl;
      else 
	cout<<"NO"<<endl;
    }else if(ux<EPS){
      if(vy<EPS)
	cout<<"YES"<<endl;
      else 
	cout<<"NO"<<endl;
    }else if(uy<EPS){
      if(vx<EPS)
	cout<<"YES"<<endl;
      else 
	cout<<"NO"<<endl;
    }else{

    if(product)
      cout<<"NO"<<endl;
    else 
      cout<<"YES"<<endl;
    }

  }

}