9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
#include <iostream>
 
using namespace std;
 
typedef struct Point{
    double x,y;
};
 
int main(){
 
    Point p[4];
    double x[2],y[2];
    while(cin>>p[0].x){
        cin>>p[0].y;
        for(int i=1;i<4;i++){
            cin>>p[i].x;
            cin>>p[i].y;
        }
        x[0] = p[0].x - p[1].x;
        x[1] = p[2].x - p[3].x;
        y[0] = p[0].y - p[1].y;
        y[1] = p[2].y - p[3].y;
        if(x[0] * x[1] + y[0] * y[1] == 0){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
 
    return 0;
}
 
 