import java.util.Scanner;

public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());
		for(int i = 0;i < n;i++){
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
		System.exit(0);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());
		for(int i = 0;i < n;i++){
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
		System.exit(0);
	}
} Main private static Scanner scan; scan public static void main(String[] args) {
		scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());
		for(int i = 0;i < n;i++){
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
		System.exit(0);
	} main {
		scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());
		for(int i = 0;i < n;i++){
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
		System.exit(0);
	} scan = new Scanner(System.in) scan new Scanner(System.in) int n = Integer.parseInt(scan.next()); n Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan for(int i = 0;i < n;i++){
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int a[] = {0,0,0}; a {0,0,0} 0 0 0 for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			} int j = 0; int j = 0; j 0 j <3 j 3 j++ j++ j {
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			} {
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			} a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2) a[j] a j (int) Math.pow(Integer.parseInt(scan.next()),2) Math.pow Math Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan 2 java.util.Arrays.sort(a) java.util.Arrays.sort java.util.Arrays java.util java java.util java.util.Arrays a if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} a[0]+a[1]==a[2] a[0]+a[1] a[0] a 0 a[1] a 1 a[2] a 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" System.exit(0) System.exit System 0 String[] args args public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());
		for(int i = 0;i < n;i++){
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
		System.exit(0);
	}
} public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());
		for(int i = 0;i < n;i++){
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
		System.exit(0);
	}
} Main
import java.util.Scanner;

public class Main {
	private static Scanner scan;
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());
		for(int i = 0;i < n;i++){
			int a[] = {0,0,0};
			for (int j = 0;j <3;j++){
				a[j] = (int) Math.pow(Integer.parseInt(scan.next()),2);
			}
			java.util.Arrays.sort(a);
			if(a[0]+a[1]==a[2]){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}
		System.exit(0);
	}
}