#include <iostream>
using namespace std;

int main(){
	double xA, yA, xB, yB, xC, yC, xD, yD;

	while(1){
		double mAB=0.0, mCD=0.0;
		cin>>xA>>yA>>xB>>yB>>xC>>yC>>xD>>yD;
		if(cin.eof())break;
		
		if((xA!=xB)&&(yA!=yB)&&(xC!=xD)&&(yC!=yD)){
			mAB=(yB-yA)/(xB-xA);
			mCD=(yD-yC)/(xD-xC);
			if((mAB*mCD)== -1)cout<<"YES\n";
		    else              cout<<"NO\n";
		}else if((xA==xB)&&(yC==yD)){
			cout<<"YES\n";
		}else if((xC==xD)&&(yA==yB)){
			cout<<"YES\n";
		}else
			cout<<"NO\n";	
		
	}

	return 0;
}