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");
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io 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");
		}
	}
} 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();
		}
	} main {
		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();
		}
	} 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();
		} catch(Exception e) {
			e.printStackTrace();
		} Exception e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
		//	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));
			}
		} Main test = new Main(); test new Main() BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) int number = Integer.parseInt(reader.readLine()); number Integer.parseInt(reader.readLine()) Integer.parseInt Integer reader.readLine() reader.readLine reader int[] sides = new int[3]; sides new int[3] 3 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));
			} int i = 0; int i = 0; i 0 i < number i number i++ i++ i {	//±±©ç{Ô
				String[] textArray = reader.readLine().split(" ");
				for(int j = 0; j < 3; j++) {
					sides[j] = Integer.parseInt(textArray[j]);
				}
				
				test.showAnswer(test.getMax(sides));
			} {	//±±©ç{Ô
				String[] textArray = reader.readLine().split(" ");
				for(int j = 0; j < 3; j++) {
					sides[j] = Integer.parseInt(textArray[j]);
				}
				
				test.showAnswer(test.getMax(sides));
			} String[] textArray = reader.readLine().split(" "); textArray reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " for(int j = 0; j < 3; j++) {
					sides[j] = Integer.parseInt(textArray[j]);
				} int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
					sides[j] = Integer.parseInt(textArray[j]);
				} {
					sides[j] = Integer.parseInt(textArray[j]);
				} sides[j] = Integer.parseInt(textArray[j]) sides[j] sides j Integer.parseInt(textArray[j]) Integer.parseInt Integer textArray[j] textArray j test.showAnswer(test.getMax(sides)) test.showAnswer test test.getMax(sides) test.getMax test sides String[] args args 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;
	} getMax {
		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;
	} int[] targetArray = array; targetArray array int max = targetArray[0]; max targetArray[0] targetArray 0 int maxPosition = 0; maxPosition 0 for(int i = 1; i < targetArray.length; i++) {
			if(max < targetArray[i]) {
				max = targetArray[i];
				maxPosition = i;
			}
		} int i = 1; int i = 1; i 1 i < targetArray.length i targetArray.length targetArray targetArray.length i++ i++ i {
			if(max < targetArray[i]) {
				max = targetArray[i];
				maxPosition = i;
			}
		} {
			if(max < targetArray[i]) {
				max = targetArray[i];
				maxPosition = i;
			}
		} if(max < targetArray[i]) {
				max = targetArray[i];
				maxPosition = i;
			} max < targetArray[i] max targetArray[i] targetArray i {
				max = targetArray[i];
				maxPosition = i;
			} max = targetArray[i] max targetArray[i] targetArray i maxPosition = i maxPosition i int temporary = targetArray[0]; temporary targetArray[0] targetArray 0 targetArray[0] = max targetArray[0] targetArray 0 max targetArray[maxPosition] = temporary targetArray[maxPosition] targetArray maxPosition temporary return targetArray; targetArray int[] array array //Åå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");
		}
	} showAnswer {
		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");
		}
	} if(array.length != 3) {
			throw new IllegalArgumentException();	//OÌ½ß
		} array.length != 3 array.length array array.length 3 {
			throw new IllegalArgumentException();	//OÌ½ß
		} throw new IllegalArgumentException();	//OÌ½ß new IllegalArgumentException() if(array[0] * array[0] == array[1] * array[1] + array[2] * array[2]) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		} array[0] * array[0] == array[1] * array[1] + array[2] * array[2] array[0] * array[0] array[0] array 0 array[0] array 0 array[1] * array[1] + array[2] * array[2] array[1] * array[1] array[1] array 1 array[1] array 1 array[2] * array[2] array[2] array 2 array[2] array 2 {
			System.out.println("YES");
		} System.out.println("YES") System.out.println System.out System System.out "YES" {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" int[] array array 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");
		}
	}
} 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");
		}
	}
} Main
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");
		}
	}
}