import java.io.BufferedReader;
import java.io.InputStreamReader;

//public class Problem0003_IsItaRightTriangle {
public class Main {
	public static void main(String[] args) {
		try {
		//	Problem0003_IsItaRightTriangle test = new Problem0003_IsItaRightTriangle();
			Main test = new Main();
			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			int number = Integer.parseInt(reader.readLine());
			int[] sides = new int[3];	//ÓÍ"side"çµ¢
			
			for(int i = 0; i < number; i++) {	//±±©ç{Ô
				String[] textArray = reader.readLine().split(" ");
				for(int j = 0; j < 3; j++) {
					sides[j] = Integer.parseInt(textArray[j]);
				}
				
				test.showAnswer(test.getMax(sides));
			}
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	int[] getMax(int[] array) {
		int[] targetArray = array;
		
		int max = targetArray[0];	//}CiXÌêÍ0ðãü³êéÆss
		int maxPosition = 0;		//0ªúlÈÌÍ¾ç©
		for(int i = 1; i < targetArray.length; i++) {
			if(max < targetArray[i]) {
				max = targetArray[i];
				maxPosition = i;
			}
		}
		
		int temporary = targetArray[0];
		targetArray[0] = max;
		targetArray[maxPosition] = temporary;
		
		return targetArray;
	}
	//ÅålªêÔOÉ ézñÉÎµÄA¼pOp`©Ç¤©¦ðo·B
	void showAnswer(int[] array) {
		if(array.length != 3) {
			throw new IllegalArgumentException();	//OÌ½ß
		}
		if(array[0] * array[0] == array[1] * array[1] + array[2] * array[2]) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz