#include <iostream>

using namespace std;

struct Vec2 {
    const double x, y;

    Vec2 (double xx, double yy)
        : x(xx), y(yy) {}

    double operator * (Vec2 other) const
    {
        return (x * other.x + y * other.y);
    }
};

int main()
{
    double xa, ya, xb, yb, xc, yc, xd, yd;
    while (cin >> xa >> ya >> xb >> yb >> xc >> yc >> xd >> yd) {
        Vec2 line01(xb - xa, yb - ya);
        Vec2 line02(xd - xc, yd - yc);

        double dot = line01 * line02;
        if (dot == 0) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}