#include<iostream>
#include<cstring>
#include<algorithm>
#include<string>
#include<vector>
#include<cstdio>
#include<cmath>
#define pb(in,tmp) in.push_back(tmp)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
const double ESP=1e-8;
const double PI=acos(-1);
using namespace std;
int main(){
double x[4],y[4];
while(cin>>x[0]>>y[0]){
rep(i,3)cin>>x[i+1]>>y[i+1];
double a=0,b=0;
int h1=0,h2=0;
if(x[0]==x[1])h1++;
else if(y[0]==y[1])h2++;
else a=(y[1]-y[0])/(x[1]-x[0]);

if(x[2]==x[3])h1++;
else if(y[2]==y[3])h2++;
else b=(y[2]-y[3])/(x[2]-x[3]);

cout<<((h1*h2==1||a*b+1<ESP)?"YES":"NO")<<endl;
}
}