import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;


public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		
		int 	countMax;
		int[]		idata = new int[3];
		String[]	data;
		List<Boolean> list = new ArrayList<Boolean>();
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		
		countMax = Integer.parseInt(reader.readLine());
		for(int i = 0; i < countMax; i++){
			data = reader.readLine().split(" ");
			for(int j = 0; j < 3; j++) idata[j] = Integer.parseInt(data[j]);
			
			for(int j = 0; j < 3; j++){
				for(int k = 0; k < 3; k++){
					if(idata[j] < idata[k]){
						int tmp = idata[j];
						idata[j] = idata[k];
						idata[k] = tmp;
					}
				}
			}
			list.add(((idata[2] * idata[2]) == (idata[0] * idata[0] + idata[1] * idata[1])));
		}
		
		for(Boolean bool : list)	System.out.println(bool.booleanValue() ? "YES" : "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