#include <iostream>
#include <cmath>
#include <vector>

using namespace std;

const double EPS=1e-8;
const double INF=1e10;

struct Point {
    double x, y;
    Point(double x=0, double y=0) : x(x), y(y) {}
    double distance (const Point &o) const {
        return sqrt((x - o.x) * (x - o.x) + (y - o.y) * (y - o.y));
    }

    Point operator+(const Point &o) const {
        return Point(x+o.x, y+o.y);
    }

    Point operator-(const Point &o) const {
        return Point(x-o.x, y-o.y);
    }

    Point operator*(const double m) const {
        return Point(x*m, y*m);
    }

    Point operator/(const double d) const {
        return Point(x/d, y/d);
    }

    bool operator==(const Point &o) const {
        return (x - o.x < EPS && y - o.y < EPS);
    }

    // 外積
    double cross(const Point &o) const {
        return x * o.y - y * o.x;
    }

    // 内積
    double dot(const Point &o) const {
        return x * o.x + y * o.y;
    }

    // ベクトルがx軸となす角
    double atan() const {
        return atan2(y, x);
    }

    // ベクトルの長さの二乗
    double norm() const {
        return dot(*this);
    }

    double abs() const {
        return fabs(x*x+y*y);
    }

    Point dir_vector() const {
        return *this/this->abs();
    }
};

struct Line {
    Point s, e; // start, end(始点,終点)
    Line(Point &s, Point &e) : s(s), e(e) {}
    Line(double sx=0, double sy=0, double ex=0, double ey=0) : s(Point(sx,sy)), e(Point(ex,ey)){}
    Point vector() const {
        return e - s;
    }
};

int main() {
    Point a, b, c, d;
    while (cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y) {
        Line ab(a, b), cd(c, d);
        if (ab.vector().dir_vector() == cd.vector().dir_vector()) {
            cout << "NO" << endl;
            continue;
        }
        if (ab.vector().dot(cd.vector()) < EPS) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}