#include <cstdio>
#include <cmath>
using namespace std;
const double eps=1.0e-12;

int main() {
  double xa, ya, xb, yb, xc, yc, xd, yd, dp;
  while (scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) == 8) {
    dp = (xb-xa)*(xd-xc)+(yb-ya)*(yd-yc);
    if (abs(dp) < eps) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  return 0;
}