import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] arg) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		int count = Integer.parseInt(str);
		for (int i = 0; i < count; i++) {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] arg) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		int count = Integer.parseInt(str);
		for (int i = 0; i < count; i++) {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}
} Main public static void main(String[] arg) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		int count = Integer.parseInt(str);
		for (int i = 0; i < count; i++) {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		int count = Integer.parseInt(str);
		for (int i = 0; i < count; i++) {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br int count = Integer.parseInt(str); count Integer.parseInt(str) Integer.parseInt Integer str for (int i = 0; i < count; i++) {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} int i = 0; int i = 0; i 0 i < count i count i++ i++ i {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		} str = br.readLine() str br.readLine() br.readLine br String[] datasetstr = str.split(" ", 3); datasetstr str.split(" ", 3) str.split str " " 3 int[] datasetint = new int[3]; datasetint new int[3] 3 for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			} int j = 0; int j = 0; j 0 j <= 2 j 2 j++ j++ j {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			} {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			} datasetint[j] = Integer.parseInt(datasetstr[j]) datasetint[j] datasetint j Integer.parseInt(datasetstr[j]) Integer.parseInt Integer datasetstr[j] datasetstr j for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			} int k = 0; int k = 0; k 0 k <= 1 k 1 k++ k++ k {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			} {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			} for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				} int l = k + 1; int l = k + 1; l k + 1 k 1 l <= 2 l 2 l++ l++ l {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				} {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				} if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					} datasetint[k] < datasetint[l] datasetint[k] datasetint k datasetint[l] datasetint l {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					} int temporary = datasetint[k]; temporary datasetint[k] datasetint k datasetint[k] = datasetint[l] datasetint[k] datasetint k datasetint[l] datasetint l datasetint[l] = temporary datasetint[l] datasetint l temporary int cc = datasetint[0] * datasetint[0]; cc datasetint[0] * datasetint[0] datasetint[0] datasetint 0 datasetint[0] datasetint 0 int aa = datasetint[1] * datasetint[1]; aa datasetint[1] * datasetint[1] datasetint[1] datasetint 1 datasetint[1] datasetint 1 int bb = datasetint[2] * datasetint[2]; bb datasetint[2] * datasetint[2] datasetint[2] datasetint 2 datasetint[2] datasetint 2 Boolean isRight = cc == (aa + bb); isRight cc == (aa + bb) cc (aa + bb) aa bb if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			} isRight {
				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[] arg arg public class Main {

	public static void main(String[] arg) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		int count = Integer.parseInt(str);
		for (int i = 0; i < count; i++) {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}
} public class Main {

	public static void main(String[] arg) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		int count = Integer.parseInt(str);
		for (int i = 0; i < count; i++) {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] arg) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		int count = Integer.parseInt(str);
		for (int i = 0; i < count; i++) {
			str = br.readLine();
			String[] datasetstr = str.split(" ", 3);
			int[] datasetint = new int[3];
			for (int j = 0; j <= 2; j++) {

				datasetint[j] = Integer.parseInt(datasetstr[j]);
			}
			for (int k = 0; k <= 1; k++) {
				for (int l = k + 1; l <= 2; l++) {
					if (datasetint[k] < datasetint[l]) {
						int temporary = datasetint[k];
						datasetint[k] = datasetint[l];
						datasetint[l] = temporary;
					}
				}
			}
			int cc = datasetint[0] * datasetint[0];
			int aa = datasetint[1] * datasetint[1];
			int bb = datasetint[2] * datasetint[2];
			Boolean isRight = cc == (aa + bb);
			if (isRight) {
				System.out.println("YES");
			} else {
				System.out.println("NO");
			}
		}
	}
}