Language: C++

#include <cmath>
#include <complex>
#include <vector>
#include <cfloat>
#include <algorithm>
using namespace std;


///////////////////////
//二次元幾何テンプレート
//点クラス point->x,y
//直線クラス line->s,v
//
class point;
class line;
point vec_add(point vec1,point vec2);//ベクトルの足し算
point vec_sub(point vec1,point vec2);//ベクトルの引き算
double inner_product(point a,point b);//内積
double outer_product(point a,point b);//外積
bool vec_parallel(point vec1,point vec2);//ベクトルの並行判定(交差判定falseとしても使える)
bool vec_angle_right(point vec1,point vec2);//ベクトルの直行判定
bool cross_line_segment(line a,point p1,point p2);//直線と線分の交差判定
//
class point{
public:
	double x,y;
	point(){
		x=0;
		y=0;
	}
	point(double a,double b){
		x=a;
		y=b;
	}
};

//直線クラス
class line{
public:
	point s,v;
public:
	line(point a,point b){
		s=a;
		v=vec_sub(a,b);
	}
};
///////////////////////


int main(){
	point a[4];
	while(cin>>a[0].x>>a[0].y){
		for(int i=1;i<4;i++){
			cin>>a[i].x>>a[i].y;
		}
		bool f=vec_angle_right(vec_sub(a[0],a[1]),vec_sub(a[2],a[3]));
		if(f){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
}
//


//多角形(頂点を保持する)
typedef vector<point> polygon;

//ベクトルの足し算
point vec_add(point vec1,point vec2){
	point res(vec1.x+vec2.x,vec1.y+vec2.y);
	return res;
}
//ベクトルの引き算
point vec_sub(point vec1,point vec2){
	point res(vec1.x-vec2.x,vec1.y-vec2.y);
	return res;
}
//内積
double inner_product(point a,point b){
	return a.x * b.x + a.y * b.y;
}
//外積
double outer_product(point a,point b){
	return a.x * b.y - a.y * b.x;
}


//ベクトルの並行判定
bool vec_parallel(point vec1,point vec2){
	if(outer_product(vec1,vec2)==0){
		return true;
	}else{
		return false;
	}
}
//ベクトルの直交判定
bool vec_angle_right(point vec1,point vec2){
	if(inner_product(vec1,vec2)==0){
		return true;
	}else{
		return false;
	}
}

bool cross_line_segment(line l,point p1,point p2){
	p1=vec_sub(p1,l.s);
	p2=vec_sub(p2,l.s);
	if(outer_product(p1,l.v)*outer_product(p2,l.v)<0){
		return true;
	}else{
		return false;
	}
}

void bool_cout(bool a){
	if(a==true){
		cout<<"true"<<endl;
	}else{
		cout<<"false"<<endl;
	}
}

//

Compiler output:
a.cc: In function 'int main()':
a.cc:52:15: error: 'cin' was not declared in this scope
   52 |         while(cin>>a[0].x>>a[0].y){
      |               ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include <algorithm>
  +++ |+#include <iostream>
    6 | using namespace std;
a.cc:58:25: error: 'cout' was not declared in this scope
   58 |                         cout<<"YES"<<endl;
      |                         ^~~~
a.cc:58:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:60:25: error: 'cout' was not declared in this scope
   60 |                         cout<<"NO"<<endl;
      |                         ^~~~
a.cc:60:25: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc: In function 'void bool_cout(bool)':
a.cc:119:17: error: 'cout' was not declared in this scope
  119 |                 cout<<"true"<<endl;
      |                 ^~~~
a.cc:119:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:121:17: error: 'cout' was not declared in this scope
  121 |                 cout<<"false"<<endl;
      |                 ^~~~
a.cc:121:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'