#include <cstdio>
using namespace std;

const double EPS = 1e-9;
double x[4], y[4];

int main() {
    while(~scanf("%d%d",&x[0],&y[0])) {
        for(int i=1; i<4; i++)
            scanf("%d%d", &x[i], &y[i]);

        double vab1 = x[0] - x[1];
        double vab2 = y[0] - y[1];
        double vcd1 = x[2] - x[3];
        double vcd2 = y[2] - y[3];

        if(vab1*vcd1 + vab2*vcd2 < EPS)
            puts("YES");
        else
            puts("NO");
    }


    return 0;
}