import java.util.Scanner;
public class 作弊药水 {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
int T=scanner.nextInt();
boolean []array=new boolean[T];
for (int i = 0; i <T ; i++) {
int x=scanner.nextInt();
int a=scanner.nextInt();
int y=scanner.nextInt();
int b=scanner.nextInt();
array[i]=isEquels(x,a,y,b);
}
for (int i = 0; i <array.length ; i++) {
if(array[i]){
System.out.println("Yes");
}else {
System.out.println("No");
}
}
}
public static boolean isEquels(int x,int a,int y,int b){
return Math.abs(a*Math.log(x)-b*Math.log(y))<0.000001;
}
}
自己测试都是对的,但是通过不了。无奈