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

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String s;

			int input = Integer.parseInt(br.readLine());
			List<String> rightAngleList = new ArrayList<String>();

			for (int i = 1; i <= input; i++) {
				s = br.readLine();
				String[] num = s.split(" ");

				Integer[] side = convertArray(num);

					Arrays.sort(side);

					if (side[2] * side[2] == side[1] * side[1] + side[0]
							* side[0]) {

						rightAngleList.add("YES");

					} else {
						rightAngleList.add("NO");
					}

			}

			String[] rightAngles = rightAngleList.toArray(new String[0]);

			for(String rightAngle : rightAngles){
				System.out.println(rightAngle);
			}


		} finally {
			br.close();
		}

	}

	public static Integer[] convertArray(String[] str) {

		List<Integer> list = new ArrayList<Integer>();

		for (String num : str) {

			list.add(Integer.parseInt(num));

		}

		return list.toArray(new Integer[0]);

	}

}
/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