#include <iostream>
#include <complex>
#include <cmath>
#include <algorithm>
#include <string>
#include <utility>
#include <vector>

#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )

using namespace std;

typedef complex<double> P;

// OÏ (cross product) : a~b = |a||b|sin¦
double cross(P a, P b) {
  return (a.real() * b.imag() - a.imag() * b.real());
}

// àÏ (dot product) : aEb = |a||b|cos¦
double dot(P a, P b) {
  return (a.real() * b.real() + a.imag() * b.imag());
}

// a1,a2ð[_Æ·éüªÆb1,b2ð[_Æ·éüªÌð·»è
bool is_intersected_ls(P a1, P a2, P b1, P b2) {
  return ( cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1) < EPS ) &&
         ( cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1) < EPS );
}

int main(){
  double xa,ya,xb,yb,xc,yc,xd,yd;
  P a,b,c,d;
  while(cin>>xa>>ya>>xb>>yb>>xc>>yc>>xd>>yd){
  a = P(xa,ya);
  b = P(xb,yb);
  c = P(xc,yc);
  d = P(xd,yd);
  if (is_intersected_ls&&abs(dot(b-a,d-c))<EPS)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  }
  return 0;
}