import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[] l = new int[3];
		while (n-->0) {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		}
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[] l = new int[3];
		while (n-->0) {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		}
	}
} Main public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[] l = new int[3];
		while (n-->0) {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		}
	} main {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[] l = new int[3];
		while (n-->0) {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		}
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int[] l = new int[3]; l new int[3] 3 while (n-->0) {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		} n-->0 n-- n 0 {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		} l[0] = s.nextInt() l[0] l 0 s.nextInt() s.nextInt s l[1] = s.nextInt() l[1] l 1 s.nextInt() s.nextInt s l[2] = s.nextInt() l[2] l 2 s.nextInt() s.nextInt s Arrays.sort(l) Arrays.sort Arrays l System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO") System.out.println System.out System System.out (l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO" (l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0) l[0]*l[0]+l[1]*l[1]-l[2]*l[2] l[0]*l[0]+l[1]*l[1] l[0]*l[0] l[0] l 0 l[0] l 0 l[1]*l[1] l[1] l 1 l[1] l 1 l[2]*l[2] l[2] l 2 l[2] l 2 0 "YES" "NO" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[] l = new int[3];
		while (n-->0) {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[] l = new int[3];
		while (n-->0) {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		}
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int[] l = new int[3];
		while (n-->0) {
			l[0] = s.nextInt();
			l[1] = s.nextInt();
			l[2] = s.nextInt();
			Arrays.sort(l);
			System.out.println((l[0]*l[0]+l[1]*l[1]-l[2]*l[2] == 0)?"YES":"NO");
		}
	}
}