#include <iostream>
using namespace std;
int main(void){
  double m,n;
  double x[4],y[4];
  while(cin>>x[0]>>y[0]){
    for(int i=1;i<4;i++){
      cin>>x[i]>>y[i];
    }
    m=n=0;
    if(x[0]!=x[1]&&y[0]!=y[1])m=(y[1]-y[0])/(x[1]-x[0]);
    if(x[2]!=x[3]&&y[2]!=y[3])n=(y[3]-y[2])/(x[3]-x[2]);
    if(m*n==-1||(x[0]==x[1]&&y[2]==y[3])||(x[2]==x[3]&&y[0]==y[1])){
      cout<<"YES";
    }else{
      cout<<"NO";
    }
    cout<<endl;
  }
  return(0);
}