gistfile1.txt //import java.util.ArrayList.*;import java.util.Scanner;import java.util.*;public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t!=0){ t--; int[] x=new int[4];
//import java.util.ArrayList.*; import java.util.Scanner; import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int t=sc.nextInt(); while(t!=0){ t--; int[] x=new int[4]; int[] y=new int[4]; for(int i=0;i<4;i++) x[i]=sc.nextInt(); for(int i=0;i<4;i++) y[i]=sc.nextInt(); String str="No"; HashSethashSet=new HashSet (); Loop: for(int i=0;i<4;i++){ for(int j=i+1;j<4;j++){ hashSet.add(l2(x[i],y[i],x[j],y[j])); if(hashSet.size()>2) break Loop; } } if(hashSet.size()==2) { Iterator iterator = hashSet.iterator(); //迭代器 Integer a = iterator.next(); Integer b = iterator.next(); if (b == 2 * a) str = "Yes"; } //System.out.println(hashSet.size()); System.out.println(str); } } public static int l2(int x1,int y1,int x2,int y2){ return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2); } }