#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
using namespace std;
#define INF	100000000
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define lb lower_bound
#define ub upper_bound
#define SS stringstream
#define rep(i,n) for(int i = 0; i < n; i++)
#define sz(x) ((int)(x).size())
#define SORT(x) sort((x).begin(), (x).end())
#define clr(a,b) memset((a),(b),sizeof(a))
typedef pair<int, int> P;
typedef long long int ll;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<P> Vp;
typedef priority_queue<int> PQ;

int main(){
	long double xa, ya, xb, yb, xc, yc, xd, yd;
	while(cin >> xa >> ya >> xb >> yb >> xc >> yc >> xd >> yd){
		if(xb == xa && yd == yc) cout << "YES" << endl;
		else if(yb == ya && xd == xc) cout << "YES" << endl;
		else if(xb == xa || xd == xc) cout << "NO" << endl;
		else if((yb-ya)*(yd-yc)/(xb-xa)/(xd-xc) == -1) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}