#include <cstdio>
#define INF (50000.0)
using namespace std;

int main()
{
	double xa, ya, xb, yb, xc, yc, xd, yd;
	
	while (scanf("%lf%lf%lf%lf%lf%lf%lf%lf",
	&xa, &ya, &xb, &yb, &xc, &yc, &xd, &yd) != EOF){
		double m_ab;
		if (xb - xa == 0){
			m_ab = INF;
		}
		else {
			m_ab = (yb - ya) / (xb - xa);
		}
		
		double m_cd;
		if (xd - xc == 0){
			m_cd = INF;
		}
		else {
			m_cd = (yd - yc) / (xd - xc);
		}
		
//		printf("%lf %lf\n", m_ab, m_cd);
		
		if (m_ab == 0.0){
			if (m_cd == INF){
				puts("YES");
			}
			else {
				puts("NO");
			}
		}
		else if (m_cd == 0.0){
			if (m_ab == INF){
				puts("YES");
			}
			else {
				puts("NO");
			}
		}
		else if (m_ab + m_cd == 0.0){
			puts("YES");
		}
		else {
			puts("NO");
		}
	}
	
	return 0;
}


// y - y1 = (y2- y1) / (x2 - x1) * (x - x1);
// y = (y2- y1) / (x2 - x1) * (x - x1) + y1;