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

public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		ArrayList<Integer> side = new ArrayList<Integer>();

			for (int i = 0; i < n; i++) {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			}
	}

	private static void judgeRightTri(ArrayList<Integer> side) {
		Collections.sort(side, Comparator.reverseOrder());

				if ( Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) ) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
	}

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

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		ArrayList<Integer> side = new ArrayList<Integer>();

			for (int i = 0; i < n; i++) {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			}
	}

	private static void judgeRightTri(ArrayList<Integer> side) {
		Collections.sort(side, Comparator.reverseOrder());

				if ( Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) ) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
	}

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		int n = sc.nextInt();
		ArrayList<Integer> side = new ArrayList<Integer>();

			for (int i = 0; i < n; i++) {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			}
	} main {
		int n = sc.nextInt();
		ArrayList<Integer> side = new ArrayList<Integer>();

			for (int i = 0; i < n; i++) {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			}
	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc ArrayList<Integer> side = new ArrayList<Integer>(); side new ArrayList<Integer>() for (int i = 0; i < n; i++) {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			} {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			} for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				} int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
					side.add(sc.nextInt());
				} {
					side.add(sc.nextInt());
				} side.add(sc.nextInt()) side.add side sc.nextInt() sc.nextInt sc judgeRightTri(side) judgeRightTri side side.clear() side.clear side String[] args args private static void judgeRightTri(ArrayList<Integer> side) {
		Collections.sort(side, Comparator.reverseOrder());

				if ( Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) ) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
	} judgeRightTri {
		Collections.sort(side, Comparator.reverseOrder());

				if ( Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) ) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
	} Collections.sort(side, Comparator.reverseOrder()) Collections.sort Collections side Comparator.reverseOrder() Comparator.reverseOrder Comparator if ( Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) ) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				} Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) Math.pow(side.get(0), 2) Math.pow Math side.get(0) side.get side 0 2 Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) Math.pow(side.get(1), 2) Math.pow Math side.get(1) side.get side 1 2 Math.pow(side.get(2), 2) Math.pow Math side.get(2) side.get side 2 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" ArrayList<Integer> side side public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		ArrayList<Integer> side = new ArrayList<Integer>();

			for (int i = 0; i < n; i++) {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			}
	}

	private static void judgeRightTri(ArrayList<Integer> side) {
		Collections.sort(side, Comparator.reverseOrder());

				if ( Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) ) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
	}

} public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		ArrayList<Integer> side = new ArrayList<Integer>();

			for (int i = 0; i < n; i++) {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			}
	}

	private static void judgeRightTri(ArrayList<Integer> side) {
		Collections.sort(side, Comparator.reverseOrder());

				if ( Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) ) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
	}

} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		ArrayList<Integer> side = new ArrayList<Integer>();

			for (int i = 0; i < n; i++) {
				for (int j = 0; j < 3; j++) {
					side.add(sc.nextInt());
				}
				judgeRightTri(side);
				side.clear();
			}
	}

	private static void judgeRightTri(ArrayList<Integer> side) {
		Collections.sort(side, Comparator.reverseOrder());

				if ( Math.pow(side.get(0), 2) == Math.pow(side.get(1), 2) + Math.pow(side.get(2), 2) ) {
					System.out.println("YES");
				} else {
					System.out.println("NO");
				}
	}

}
