

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

 class Main {

	public static void main(String[] args) {

		// get user input
		List<List<Integer>> userInputs = getUserInputs();
		for (List<Integer> triangleSides : userInputs) {
			// check whether triagle is rightAngleTriable or not
			boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides);
			if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}


	private static boolean isRightAngleTraingle(List<Integer> intList) {
		if(intList == null || intList.isEmpty() || intList.size() != 3){
			return false;
		}
		Collections.sort(intList);
		
		int aSide = intList.get(0);
		int bSide = intList.get(1);
		int cSide = intList.get(2);
		if ((cSide * cSide) == ((aSide * aSide) + (bSide * bSide))) {
			return true;
		}
		return false;
	}

	
	private static List<List<Integer>> getUserInputs() {
		int repetation = 0;
		List<List<Integer>> returnList = new ArrayList<>();

		// get user input
		List<String> userList = new ArrayList<String>();
		{
			Scanner in = new Scanner(System.in);
			String sNum = in.nextLine();
			repetation = Integer.parseInt(sNum);
			
			for (int i = 0; i < repetation; i++) {
				userList.add(in.nextLine());
			}
		}
		// convert string into Integer
		{

			for (String input : userList) {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			}
		}
		return returnList;
	}

} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {

		// get user input
		List<List<Integer>> userInputs = getUserInputs();
		for (List<Integer> triangleSides : userInputs) {
			// check whether triagle is rightAngleTriable or not
			boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides);
			if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}


	private static boolean isRightAngleTraingle(List<Integer> intList) {
		if(intList == null || intList.isEmpty() || intList.size() != 3){
			return false;
		}
		Collections.sort(intList);
		
		int aSide = intList.get(0);
		int bSide = intList.get(1);
		int cSide = intList.get(2);
		if ((cSide * cSide) == ((aSide * aSide) + (bSide * bSide))) {
			return true;
		}
		return false;
	}

	
	private static List<List<Integer>> getUserInputs() {
		int repetation = 0;
		List<List<Integer>> returnList = new ArrayList<>();

		// get user input
		List<String> userList = new ArrayList<String>();
		{
			Scanner in = new Scanner(System.in);
			String sNum = in.nextLine();
			repetation = Integer.parseInt(sNum);
			
			for (int i = 0; i < repetation; i++) {
				userList.add(in.nextLine());
			}
		}
		// convert string into Integer
		{

			for (String input : userList) {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			}
		}
		return returnList;
	}

} Main public static void main(String[] args) {

		// get user input
		List<List<Integer>> userInputs = getUserInputs();
		for (List<Integer> triangleSides : userInputs) {
			// check whether triagle is rightAngleTriable or not
			boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides);
			if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	} main {

		// get user input
		List<List<Integer>> userInputs = getUserInputs();
		for (List<Integer> triangleSides : userInputs) {
			// check whether triagle is rightAngleTriable or not
			boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides);
			if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	} List<List<Integer>> userInputs = getUserInputs(); userInputs getUserInputs() getUserInputs for (List<Integer> triangleSides : userInputs) {
			// check whether triagle is rightAngleTriable or not
			boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides);
			if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} List<Integer> triangleSides userInputs {
			// check whether triagle is rightAngleTriable or not
			boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides);
			if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} {
			// check whether triagle is rightAngleTriable or not
			boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides);
			if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides); isRightAngleTrangle isRightAngleTraingle(triangleSides) isRightAngleTraingle triangleSides if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} isRightAngleTrangle {
				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" String[] args args private static boolean isRightAngleTraingle(List<Integer> intList) {
		if(intList == null || intList.isEmpty() || intList.size() != 3){
			return false;
		}
		Collections.sort(intList);
		
		int aSide = intList.get(0);
		int bSide = intList.get(1);
		int cSide = intList.get(2);
		if ((cSide * cSide) == ((aSide * aSide) + (bSide * bSide))) {
			return true;
		}
		return false;
	} isRightAngleTraingle {
		if(intList == null || intList.isEmpty() || intList.size() != 3){
			return false;
		}
		Collections.sort(intList);
		
		int aSide = intList.get(0);
		int bSide = intList.get(1);
		int cSide = intList.get(2);
		if ((cSide * cSide) == ((aSide * aSide) + (bSide * bSide))) {
			return true;
		}
		return false;
	} if(intList == null || intList.isEmpty() || intList.size() != 3){
			return false;
		} intList == null || intList.isEmpty() || intList.size() != 3 intList == null || intList.isEmpty() || intList.size() != 3 intList == null intList null intList.isEmpty() intList.isEmpty intList intList.size() != 3 intList.size() intList.size intList 3 {
			return false;
		} return false; false Collections.sort(intList) Collections.sort Collections intList int aSide = intList.get(0); aSide intList.get(0) intList.get intList 0 int bSide = intList.get(1); bSide intList.get(1) intList.get intList 1 int cSide = intList.get(2); cSide intList.get(2) intList.get intList 2 if ((cSide * cSide) == ((aSide * aSide) + (bSide * bSide))) {
			return true;
		} (cSide * cSide) == ((aSide * aSide) + (bSide * bSide)) (cSide * cSide) cSide cSide ((aSide * aSide) + (bSide * bSide)) (aSide * aSide) aSide aSide (bSide * bSide) bSide bSide {
			return true;
		} return true; true return false; false List<Integer> intList intList private static List<List<Integer>> getUserInputs() {
		int repetation = 0;
		List<List<Integer>> returnList = new ArrayList<>();

		// get user input
		List<String> userList = new ArrayList<String>();
		{
			Scanner in = new Scanner(System.in);
			String sNum = in.nextLine();
			repetation = Integer.parseInt(sNum);
			
			for (int i = 0; i < repetation; i++) {
				userList.add(in.nextLine());
			}
		}
		// convert string into Integer
		{

			for (String input : userList) {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			}
		}
		return returnList;
	} getUserInputs {
		int repetation = 0;
		List<List<Integer>> returnList = new ArrayList<>();

		// get user input
		List<String> userList = new ArrayList<String>();
		{
			Scanner in = new Scanner(System.in);
			String sNum = in.nextLine();
			repetation = Integer.parseInt(sNum);
			
			for (int i = 0; i < repetation; i++) {
				userList.add(in.nextLine());
			}
		}
		// convert string into Integer
		{

			for (String input : userList) {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			}
		}
		return returnList;
	} int repetation = 0; repetation 0 List<List<Integer>> returnList = new ArrayList<>(); returnList new ArrayList<>() List<String> userList = new ArrayList<String>(); userList new ArrayList<String>() {
			Scanner in = new Scanner(System.in);
			String sNum = in.nextLine();
			repetation = Integer.parseInt(sNum);
			
			for (int i = 0; i < repetation; i++) {
				userList.add(in.nextLine());
			}
		} Scanner in = new Scanner(System.in); in new Scanner(System.in) String sNum = in.nextLine(); sNum in.nextLine() in.nextLine in repetation = Integer.parseInt(sNum) repetation Integer.parseInt(sNum) Integer.parseInt Integer sNum for (int i = 0; i < repetation; i++) {
				userList.add(in.nextLine());
			} int i = 0; int i = 0; i 0 i < repetation i repetation i++ i++ i {
				userList.add(in.nextLine());
			} {
				userList.add(in.nextLine());
			} userList.add(in.nextLine()) userList.add userList in.nextLine() in.nextLine in {

			for (String input : userList) {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			}
		} for (String input : userList) {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			} String input userList {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			} {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			} input = input.trim() input input.trim() input.trim input if(input.length() == 0){
					continue;
				} input.length() == 0 input.length() input.length input 0 {
					continue;
				} continue; String array[] = input.split("\\s+"); array input.split("\\s+") input.split input "\\s+" ArrayList<Integer> intList = new ArrayList<Integer>(); intList new ArrayList<Integer>() for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				} {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				} String num = array[i]; num array[i] array i intList.add(Integer.parseInt(num.trim())) intList.add intList Integer.parseInt(num.trim()) Integer.parseInt Integer num.trim() num.trim num returnList.add(intList) returnList.add returnList intList return returnList; returnList


import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

 class Main {

	public static void main(String[] args) {

		// get user input
		List<List<Integer>> userInputs = getUserInputs();
		for (List<Integer> triangleSides : userInputs) {
			// check whether triagle is rightAngleTriable or not
			boolean isRightAngleTrangle = isRightAngleTraingle(triangleSides);
			if (isRightAngleTrangle) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}


	private static boolean isRightAngleTraingle(List<Integer> intList) {
		if(intList == null || intList.isEmpty() || intList.size() != 3){
			return false;
		}
		Collections.sort(intList);
		
		int aSide = intList.get(0);
		int bSide = intList.get(1);
		int cSide = intList.get(2);
		if ((cSide * cSide) == ((aSide * aSide) + (bSide * bSide))) {
			return true;
		}
		return false;
	}

	
	private static List<List<Integer>> getUserInputs() {
		int repetation = 0;
		List<List<Integer>> returnList = new ArrayList<>();

		// get user input
		List<String> userList = new ArrayList<String>();
		{
			Scanner in = new Scanner(System.in);
			String sNum = in.nextLine();
			repetation = Integer.parseInt(sNum);
			
			for (int i = 0; i < repetation; i++) {
				userList.add(in.nextLine());
			}
		}
		// convert string into Integer
		{

			for (String input : userList) {
				input = input.trim();
				if(input.length() == 0){
					continue;
				}
				String array[] = input.split("\\s+");
				ArrayList<Integer> intList = new ArrayList<Integer>();
				for (int i = 0; i < array.length; i++) {
					String num = array[i];					
					intList.add(Integer.parseInt(num.trim()));
				}
				returnList.add(intList);
			}
		}
		return returnList;
	}

}