#include<iostream>
using namespace std;
int main(){

  double ax,ay,bx,by,cx,cy,dx,dy;
  while(cin>>ax>>ay>>bx>>by>>cx>>cy>>dx>>dy){
    int han1=0,han2=0;
    double a=999799,b=949999;
    if(ax==bx)han1++;
    else if(ay==by)han2++;
    else a=(by-ay)/(bx-ax);
    if(cx==dx)han1++;
    else if(cy==dy)han2++;
    else b=(dy-cy)/(dx-cx);

    if(han1*han2==1||a==-1/b)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;

  }
}