Language: C++


main(){
  double xa, ya, xb, yb, xc, yc, xd, yd;
  double A,B;//AAB
  while((scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd))!=EOF){
    // cout << xa << " "<<ya << " " << yd<< endl;
    
    if((xa-xb) != 0){A=(ya-yb)/(xa-xb);}
    if((xc-xd) != 0){B=(yc-yd)/(xc-xd);}
    
    
    if(A*B==-1){cout << "YES"<<endl;}
    else if((xa-xb)==0 && (ya-yb)==0 ||(xc-xd)==0 && (yc-yd)==0 ){cout << "YES"<<endl;}
    else if((xa-xb)==0&&(xc-xd)==0){cout << "NO"<<endl;}
    else if((xa-xb)==0&&B==0){cout << "YES"<<endl;}
    else if((xc-xd)==0&&A==0){cout << "YES"<<endl;}
    else {cout << "NO"<<endl;}

  }
    
  return 0;
 
 
}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:10: error: 'scanf' was not declared in this scope
    5 |   while((scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd))!=EOF){
      |          ^~~~~
a.cc:5:78: error: 'EOF' was not declared in this scope
    5 |   while((scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&xa,&ya,&xb,&yb,&xc,&yc,&xd,&yd))!=EOF){
      |                                                                              ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:12:17: error: 'cout' was not declared in this scope
   12 |     if(A*B==-1){cout << "YES"<<endl;}
      |                 ^~~~
a.cc:12:32: error: 'endl' was not declared in this scope
   12 |     if(A*B==-1){cout << "YES"<<endl;}
      |                                ^~~~
a.cc:13:67: error: 'cout' was not declared in this scope
   13 |     else if((xa-xb)==0 && (ya-yb)==0 ||(xc-xd)==0 && (yc-yd)==0 ){cout << "YES"<<endl;}
      |                                                                   ^~~~
a.cc:13:82: error: 'endl' was not declared in this scope
   13 |     else if((xa-xb)==0 && (ya-yb)==0 ||(xc-xd)==0 && (yc-yd)==0 ){cout << "YES"<<endl;}
      |                                                                                  ^~~~
a.cc:14:37: error: 'cout' was not declared in this scope
   14 |     else if((xa-xb)==0&&(xc-xd)==0){cout << "NO"<<endl;}
      |                                     ^~~~
a.cc:14:51: error: 'endl' was not declared in this scope
   14 |     else if((xa-xb)==0&&(xc-xd)==0){cout << "NO"<<endl;}
      |                                                   ^~~~
a.cc:15:31: error: 'cout' was not declared in this scope
   15 |     else if((xa-xb)==0&&B==0){cout << "YES"<<endl;}
      |                               ^~~~
a.cc:15:46: error: 'endl' was not declared in this scope
   15 |     else if((xa-xb)==0&&B==0){cout << "YES"<<endl;}
      |                                              ^~~~
a.cc:16:31: error: 'cout' was not declared in this scope
   16 |     else if((xc-xd)==0&&A==0){cout << "YES"<<endl;}
      |                               ^~~~
a.cc:16:46: error: 'endl' was not declared in this scope
   16 |     else if((xc-xd)==0&&A==0){cout << "YES"<<endl;}
      |                                              ^~~~
a.cc:17:11: error: 'cout' was not declared in this scope
   17 |     else {cout << "NO"<<endl;}
      |           ^~~~
a.cc:17:25: error: 'endl' was not declared in this scope
   17 |     else {cout << "NO"<<endl;}
      |                         ^~~~