#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>
#include <climits>
#include <cfloat>
 
 
using namespace std;
 
double distance(double x1, double y1, double x2, double y2)
{
    double dx = x1-x2;
    double dy = y1-y2;
    return sqrt(dx*dx+dy*dy);
}
 
int main()
{
    double x[4], y[4];
    while (scanf("%lf %lf %lf %lf %lf %lf %lf %lf\n"
        , x, y, x+1, y+1, x+2, y+2, x+3, y+3) != EOF)
    {
        bool f1 = x[0] == x[1] && y[2] == y[3]
        || x[2] == x[3] && y[0] == y[1];
 
        double a[2];
        for (int i = 0; i < 2; ++i)
            a[i] = (y[2*i+1]-y[2*i])/(x[2*i+1]-x[2*i]);
 
        bool f2 = fabs(a[0]*a[1] + 1) <= 0.000001;
 
        if (f1 || f2)
            puts("YES");
        else
            puts("NO");
    }
 
    return 0;
}