#include <iostream>
#include <cmath>

using namespace std;

int main() {
  double x_a, y_a, x_b, y_b, x_c, y_c, x_d, y_d;
  while (cin >> x_a >> y_a >> x_b >> y_b >> x_c >> y_c >> x_d >> y_d) {
    double dx1 = x_b - x_a;
    double dy1 = y_b - y_a;
    double dx2 = x_c - x_d;
    double dy2 = y_c - y_d;
    double det = dx1 * dx2 + dy1 * dy2;
    cout << ((abs(det) < 1e-10) ? "YES" : "NO") << endl;
  }
}
