import java.util.*;
 
class Main {
    public static void main(String[] args) {
    	
    	Scanner sc = new Scanner(System.in);
    	ArrayList<String> ynJudge = new ArrayList<>();
    	
    	int N = sc.nextInt();
    	int sideA, sideB, sideC;
    	int cnt = 0;
    	for(int i = 0; i < N; i++) {
    		sideA = sc.nextInt();
    		sideB = sc.nextInt();
    		sideC = sc.nextInt();
    		if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		}
    	}
    	for(int i = 0; i < cnt; i++) {
    		System.out.println(ynJudge.get(i));
    	}
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
    	
    	Scanner sc = new Scanner(System.in);
    	ArrayList<String> ynJudge = new ArrayList<>();
    	
    	int N = sc.nextInt();
    	int sideA, sideB, sideC;
    	int cnt = 0;
    	for(int i = 0; i < N; i++) {
    		sideA = sc.nextInt();
    		sideB = sc.nextInt();
    		sideC = sc.nextInt();
    		if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		}
    	}
    	for(int i = 0; i < cnt; i++) {
    		System.out.println(ynJudge.get(i));
    	}
    }
} Main public static void main(String[] args) {
    	
    	Scanner sc = new Scanner(System.in);
    	ArrayList<String> ynJudge = new ArrayList<>();
    	
    	int N = sc.nextInt();
    	int sideA, sideB, sideC;
    	int cnt = 0;
    	for(int i = 0; i < N; i++) {
    		sideA = sc.nextInt();
    		sideB = sc.nextInt();
    		sideC = sc.nextInt();
    		if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		}
    	}
    	for(int i = 0; i < cnt; i++) {
    		System.out.println(ynJudge.get(i));
    	}
    } main {
    	
    	Scanner sc = new Scanner(System.in);
    	ArrayList<String> ynJudge = new ArrayList<>();
    	
    	int N = sc.nextInt();
    	int sideA, sideB, sideC;
    	int cnt = 0;
    	for(int i = 0; i < N; i++) {
    		sideA = sc.nextInt();
    		sideB = sc.nextInt();
    		sideC = sc.nextInt();
    		if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		}
    	}
    	for(int i = 0; i < cnt; i++) {
    		System.out.println(ynJudge.get(i));
    	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<String> ynJudge = new ArrayList<>(); ynJudge new ArrayList<>() int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int sideA sideA sideB sideB sideC; sideC int cnt = 0; cnt 0 for(int i = 0; i < N; i++) {
    		sideA = sc.nextInt();
    		sideB = sc.nextInt();
    		sideC = sc.nextInt();
    		if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		}
    	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
    		sideA = sc.nextInt();
    		sideB = sc.nextInt();
    		sideC = sc.nextInt();
    		if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		}
    	} {
    		sideA = sc.nextInt();
    		sideB = sc.nextInt();
    		sideC = sc.nextInt();
    		if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		}
    	} sideA = sc.nextInt() sideA sc.nextInt() sc.nextInt sc sideB = sc.nextInt() sideB sc.nextInt() sc.nextInt sc sideC = sc.nextInt() sideC sc.nextInt() sc.nextInt sc if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		} sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB sideA * sideA == sideB * sideB + sideC * sideC sideA * sideA sideA sideA sideB * sideB + sideC * sideC sideB * sideB sideB sideB sideC * sideC sideC sideC sideB * sideB == sideA * sideA + sideC * sideC sideB * sideB sideB sideB sideA * sideA + sideC * sideC sideA * sideA sideA sideA sideC * sideC sideC sideC sideC * sideC == sideA * sideA + sideB * sideB sideC * sideC sideC sideC sideA * sideA + sideB * sideB sideA * sideA sideA sideA sideB * sideB sideB sideB {
    			ynJudge.add("YES");
    			cnt++;
    		} ynJudge.add("YES") ynJudge.add ynJudge "YES" cnt++ cnt {
    			ynJudge.add("NO");
    			cnt++;
    		} ynJudge.add("NO") ynJudge.add ynJudge "NO" cnt++ cnt for(int i = 0; i < cnt; i++) {
    		System.out.println(ynJudge.get(i));
    	} int i = 0; int i = 0; i 0 i < cnt i cnt i++ i++ i {
    		System.out.println(ynJudge.get(i));
    	} {
    		System.out.println(ynJudge.get(i));
    	} System.out.println(ynJudge.get(i)) System.out.println System.out System System.out ynJudge.get(i) ynJudge.get ynJudge i String[] args args
import java.util.*;
 
class Main {
    public static void main(String[] args) {
    	
    	Scanner sc = new Scanner(System.in);
    	ArrayList<String> ynJudge = new ArrayList<>();
    	
    	int N = sc.nextInt();
    	int sideA, sideB, sideC;
    	int cnt = 0;
    	for(int i = 0; i < N; i++) {
    		sideA = sc.nextInt();
    		sideB = sc.nextInt();
    		sideC = sc.nextInt();
    		if(sideA * sideA == sideB * sideB + sideC * sideC ||
    		   sideB * sideB == sideA * sideA + sideC * sideC ||
    		   sideC * sideC == sideA * sideA + sideB * sideB) {
    			ynJudge.add("YES");
    			cnt++;
    		} else {
    			ynJudge.add("NO");
    			cnt++;
    		}
    	}
    	for(int i = 0; i < cnt; i++) {
    		System.out.println(ynJudge.get(i));
    	}
    }
}