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

public class Main {

	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		int a = Integer.parseInt(reader.readLine());
		for (int i = 0; i < a; i++) {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		}
		System.out.print(builder);

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {

	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		int a = Integer.parseInt(reader.readLine());
		for (int i = 0; i < a; i++) {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		}
		System.out.print(builder);

	}
} Main public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		int a = Integer.parseInt(reader.readLine());
		for (int i = 0; i < a; i++) {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		}
		System.out.print(builder);

	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		int a = Integer.parseInt(reader.readLine());
		for (int i = 0; i < a; i++) {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		}
		System.out.print(builder);

	} BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in)); reader new BufferedReader(new InputStreamReader(
				System.in)) StringBuilder builder = new StringBuilder(); builder new StringBuilder() int a = Integer.parseInt(reader.readLine()); a Integer.parseInt(reader.readLine()) Integer.parseInt Integer reader.readLine() reader.readLine reader for (int i = 0; i < a; i++) {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		} {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		} String[] line = reader.readLine().split(" "); line reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int[] nums = new int[3]; nums new int[3] 3 for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			} int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
				nums[j] = Integer.parseInt(line[j]);
			} {
				nums[j] = Integer.parseInt(line[j]);
			} nums[j] = Integer.parseInt(line[j]) nums[j] nums j Integer.parseInt(line[j]) Integer.parseInt Integer line[j] line j Arrays.sort(nums) Arrays.sort Arrays nums if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n"); Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2) Math.pow(nums[0], 2) + Math.pow(nums[1], 2) Math.pow(nums[0], 2) Math.pow Math nums[0] nums 0 2 Math.pow(nums[1], 2) Math.pow Math nums[1] nums 1 2 Math.pow(
					nums[2], 2) Math.pow Math nums[2] nums 2 2 builder.append("YES\n") builder.append builder "YES\n" builder.append("NO\n") builder.append builder "NO\n" System.out.print(builder) System.out.print System.out System System.out builder String[] args args public class Main {

	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		int a = Integer.parseInt(reader.readLine());
		for (int i = 0; i < a; i++) {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		}
		System.out.print(builder);

	}
} public class Main {

	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		int a = Integer.parseInt(reader.readLine());
		for (int i = 0; i < a; i++) {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		}
		System.out.print(builder);

	}
} Main

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

public class Main {

	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		int a = Integer.parseInt(reader.readLine());
		for (int i = 0; i < a; i++) {
			String[] line = reader.readLine().split(" ");
			int[] nums = new int[3];
			for (int j = 0; j < 3; j++) {
				nums[j] = Integer.parseInt(line[j]);
			}
			Arrays.sort(nums);
			if (Math.pow(nums[0], 2) + Math.pow(nums[1], 2) == Math.pow(
					nums[2], 2))
				builder.append("YES\n");
			else
				builder.append("NO\n");
		}
		System.out.print(builder);

	}
}