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

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		List<String> ret = new ArrayList<String>();
		int i, max = sc.nextInt();
		for (i = 0; i < max; i++) {
			double a = Math.pow(sc.nextInt(), 2);
			double b = Math.pow(sc.nextInt(), 2);
			double c = Math.pow(sc.nextInt(), 2);
			if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			}
		}
		for (String text : ret) {
			System.out.println(text);
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		List<String> ret = new ArrayList<String>();
		int i, max = sc.nextInt();
		for (i = 0; i < max; i++) {
			double a = Math.pow(sc.nextInt(), 2);
			double b = Math.pow(sc.nextInt(), 2);
			double c = Math.pow(sc.nextInt(), 2);
			if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			}
		}
		for (String text : ret) {
			System.out.println(text);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		List<String> ret = new ArrayList<String>();
		int i, max = sc.nextInt();
		for (i = 0; i < max; i++) {
			double a = Math.pow(sc.nextInt(), 2);
			double b = Math.pow(sc.nextInt(), 2);
			double c = Math.pow(sc.nextInt(), 2);
			if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			}
		}
		for (String text : ret) {
			System.out.println(text);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		List<String> ret = new ArrayList<String>();
		int i, max = sc.nextInt();
		for (i = 0; i < max; i++) {
			double a = Math.pow(sc.nextInt(), 2);
			double b = Math.pow(sc.nextInt(), 2);
			double c = Math.pow(sc.nextInt(), 2);
			if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			}
		}
		for (String text : ret) {
			System.out.println(text);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) List<String> ret = new ArrayList<String>(); ret new ArrayList<String>() int i i max = sc.nextInt(); max sc.nextInt() sc.nextInt sc for (i = 0; i < max; i++) {
			double a = Math.pow(sc.nextInt(), 2);
			double b = Math.pow(sc.nextInt(), 2);
			double c = Math.pow(sc.nextInt(), 2);
			if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			}
		} i = 0; i = 0 i 0 i < max i max i++ i++ i {
			double a = Math.pow(sc.nextInt(), 2);
			double b = Math.pow(sc.nextInt(), 2);
			double c = Math.pow(sc.nextInt(), 2);
			if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			}
		} {
			double a = Math.pow(sc.nextInt(), 2);
			double b = Math.pow(sc.nextInt(), 2);
			double c = Math.pow(sc.nextInt(), 2);
			if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			}
		} double a = Math.pow(sc.nextInt(), 2); a Math.pow(sc.nextInt(), 2) Math.pow Math sc.nextInt() sc.nextInt sc 2 double b = Math.pow(sc.nextInt(), 2); b Math.pow(sc.nextInt(), 2) Math.pow Math sc.nextInt() sc.nextInt sc 2 double c = Math.pow(sc.nextInt(), 2); c Math.pow(sc.nextInt(), 2) Math.pow Math sc.nextInt() sc.nextInt sc 2 if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			} a + b == c || b + c == a || a + c == b a + b == c || b + c == a || a + c == b a + b == c a + b a b c b + c == a b + c b c a a + c == b a + c a c b {
				ret.add("YES");
			} ret.add("YES") ret.add ret "YES" {
				ret.add("NO");
			} ret.add("NO") ret.add ret "NO" for (String text : ret) {
			System.out.println(text);
		} String text ret {
			System.out.println(text);
		} {
			System.out.println(text);
		} System.out.println(text) System.out.println System.out System System.out text String[] args args
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		List<String> ret = new ArrayList<String>();
		int i, max = sc.nextInt();
		for (i = 0; i < max; i++) {
			double a = Math.pow(sc.nextInt(), 2);
			double b = Math.pow(sc.nextInt(), 2);
			double c = Math.pow(sc.nextInt(), 2);
			if (a + b == c || b + c == a || a + c == b) {
				ret.add("YES");
			} else {
				ret.add("NO");
			}
		}
		for (String text : ret) {
			System.out.println(text);
		}
	}
}