Language: C

#include<stdio.h>
int main(){
  double x[4],y[4];
  int n,i,j,ans1,ans2;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    for(j=0;j<4;j++){
      scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
    }
    for(j=0;j<4;j+=2){
      if(x[j]<x[j+1]){
	if(j == 0){
	  ans1 = x[j+1] - x[j];
	}
	else{
	  ans2 = x[j+1] - x[j];
	}
      }
      else{
	if(j == 2){
	  ans1 = x[j] - x[j+1];
	}
	else{
	  ans2 = x[j] - x[j+1];
	}
      }
    }
    if(ans1 == ans2){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:48: error: 'x1' undeclared (first use in this function); did you mean 'x'?
    8 |       scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      |                                                ^~
      |                                                x
main.c:8:48: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:52: error: 'y1' undeclared (first use in this function); did you mean 'y'?
    8 |       scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      |                                                    ^~
      |                                                    y
main.c:8:56: error: 'x2' undeclared (first use in this function); did you mean 'x'?
    8 |       scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      |                                                        ^~
      |                                                        x
main.c:8:60: error: 'y2' undeclared (first use in this function); did you mean 'y'?
    8 |       scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      |                                                            ^~
      |                                                            y
main.c:8:64: error: 'x3' undeclared (first use in this function); did you mean 'x'?
    8 |       scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      |                                                                ^~
      |                                                                x
main.c:8:68: error: 'y3' undeclared (first use in this function); did you mean 'y'?
    8 |       scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      |                                                                    ^~
      |                                                                    y
main.c:8:72: error: 'x4' undeclared (first use in this function); did you mean 'x'?
    8 |       scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      |                                                                        ^~
      |                                                                        x
main.c:8:76: error: 'y4' undeclared (first use in this function); did you mean 'y'?
    8 |       scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
      |                                                                            ^~
      |                                                                            y