#include <bits/stdc++.h>

using namespace std;

const double EPS = 1e-8;
const double INF = 1e12;
typedef complex<double> P;
namespace std {
  bool operator < (const P& a, const P& b) {
      return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
    }
}
double cross(const P& a, const P& b) {
  return imag(conj(a)*b);
}
double dot(const P& a, const P& b) {
  return real(conj(a)*b);
}

struct L : public vector<P> {
  L(const P &a, const P &b) {
      push_back(a); push_back(b);
    }
};

int main(){
    double xA, yA, xB, yB, xC, yC, xD, yD;
    while(cin >> xA >> yA >> xB >> yB >> xC >> yC >> xD >> yD){
        L a(P(xA, yA), P(xB, yB)), b(P(xC, yC), P(xD, yD));
        cout << (abs(dot(a[0]-a[1], b[0]-b[1]))<EPS?"YES":"NO") << endl;
    }
}