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

public class Main {

	/** YES:??´?§?????§???¢??§?????? */
	private static final String RIGHT_TRIANGLE = "YES";

	/** NO:??´?§?????§???¢??§????????? */
	private static final String NOT_RIGHT_TRIANGLE = "NO";

	/**
	 * AOJ Is it a Right Triangle?
	 *
	 * @param args
	 * @throws IOException
	 *             ??\?????¨??????
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		int numsOfDataSets = Integer.parseInt(bufferedReader.readLine());

		for (int i = 0; i < numsOfDataSets; i++) {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		}

		bufferedReader.close();
	}

	/**
	 * 3???????????????????????´?§?????§???¢????????????????????????
	 *
	 * @param triangle
	 * @return
	 */
	private static boolean isRightTriangle(int[] sides) {

		Arrays.sort(sides);
		if (calcSumPower(sides[0], sides[1]) == calcPower(sides[2])) {
			return true;
		}
		return false;
	}

	/**
	 * String????????????int?????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getIntArray(String[] strArray) {
		int[] intArray = new int[3];
		for (int i = 0; i < 3; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	}

	/**
	 * ?????°???????????????????????´??????
	 *
	 * @param n
	 *            ???????????????
	 * @return ?????°??????????????????
	 */
	private static int calcPower(int n) {
		return n * n;
	}

	/**
	 * ????????°??????????????????????????´??????
	 *
	 * @param n
	 *            ??´??°1
	 * @param m
	 *            ??´??°2
	 * @return ????????°??????????????????
	 */
	private static int calcSumPower(int n, int m) {
		return calcPower(n) + calcPower(m);
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util public class Main {

	/** YES:??´?§?????§???¢??§?????? */
	private static final String RIGHT_TRIANGLE = "YES";

	/** NO:??´?§?????§???¢??§????????? */
	private static final String NOT_RIGHT_TRIANGLE = "NO";

	/**
	 * AOJ Is it a Right Triangle?
	 *
	 * @param args
	 * @throws IOException
	 *             ??\?????¨??????
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		int numsOfDataSets = Integer.parseInt(bufferedReader.readLine());

		for (int i = 0; i < numsOfDataSets; i++) {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		}

		bufferedReader.close();
	}

	/**
	 * 3???????????????????????´?§?????§???¢????????????????????????
	 *
	 * @param triangle
	 * @return
	 */
	private static boolean isRightTriangle(int[] sides) {

		Arrays.sort(sides);
		if (calcSumPower(sides[0], sides[1]) == calcPower(sides[2])) {
			return true;
		}
		return false;
	}

	/**
	 * String????????????int?????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getIntArray(String[] strArray) {
		int[] intArray = new int[3];
		for (int i = 0; i < 3; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	}

	/**
	 * ?????°???????????????????????´??????
	 *
	 * @param n
	 *            ???????????????
	 * @return ?????°??????????????????
	 */
	private static int calcPower(int n) {
		return n * n;
	}

	/**
	 * ????????°??????????????????????????´??????
	 *
	 * @param n
	 *            ??´??°1
	 * @param m
	 *            ??´??°2
	 * @return ????????°??????????????????
	 */
	private static int calcSumPower(int n, int m) {
		return calcPower(n) + calcPower(m);
	}

} Main /** YES:??´?§?????§???¢??§?????? */
	private static final String RIGHT_TRIANGLE = "YES"; RIGHT_TRIANGLE "YES" /** NO:??´?§?????§???¢??§????????? */
	private static final String NOT_RIGHT_TRIANGLE = "NO"; NOT_RIGHT_TRIANGLE "NO" /**
	 * AOJ Is it a Right Triangle?
	 *
	 * @param args
	 * @throws IOException
	 *             ??\?????¨??????
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		int numsOfDataSets = Integer.parseInt(bufferedReader.readLine());

		for (int i = 0; i < numsOfDataSets; i++) {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		}

		bufferedReader.close();
	} main {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		int numsOfDataSets = Integer.parseInt(bufferedReader.readLine());

		for (int i = 0; i < numsOfDataSets; i++) {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		}

		bufferedReader.close();
	} BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in)); bufferedReader new BufferedReader(
				new InputStreamReader(System.in)) int numsOfDataSets = Integer.parseInt(bufferedReader.readLine()); numsOfDataSets Integer.parseInt(bufferedReader.readLine()) Integer.parseInt Integer bufferedReader.readLine() bufferedReader.readLine bufferedReader for (int i = 0; i < numsOfDataSets; i++) {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		} int i = 0; int i = 0; i 0 i < numsOfDataSets i numsOfDataSets i++ i++ i {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		} {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		} String[] triangle = bufferedReader.readLine().split("\\s"); triangle bufferedReader.readLine().split("\\s") bufferedReader.readLine().split bufferedReader.readLine() bufferedReader.readLine bufferedReader "\\s" int[] sides = getIntArray(triangle); sides getIntArray(triangle) getIntArray triangle if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			} isRightTriangle(sides) isRightTriangle sides {
				System.out.println(RIGHT_TRIANGLE);
			} System.out.println(RIGHT_TRIANGLE) System.out.println System.out System System.out RIGHT_TRIANGLE {
				System.out.println(NOT_RIGHT_TRIANGLE);
			} System.out.println(NOT_RIGHT_TRIANGLE) System.out.println System.out System System.out NOT_RIGHT_TRIANGLE bufferedReader.close() bufferedReader.close bufferedReader String[] args args /**
	 * 3???????????????????????´?§?????§???¢????????????????????????
	 *
	 * @param triangle
	 * @return
	 */
	private static boolean isRightTriangle(int[] sides) {

		Arrays.sort(sides);
		if (calcSumPower(sides[0], sides[1]) == calcPower(sides[2])) {
			return true;
		}
		return false;
	} isRightTriangle {

		Arrays.sort(sides);
		if (calcSumPower(sides[0], sides[1]) == calcPower(sides[2])) {
			return true;
		}
		return false;
	} Arrays.sort(sides) Arrays.sort Arrays sides if (calcSumPower(sides[0], sides[1]) == calcPower(sides[2])) {
			return true;
		} calcSumPower(sides[0], sides[1]) == calcPower(sides[2]) calcSumPower(sides[0], sides[1]) calcSumPower sides[0] sides 0 sides[1] sides 1 calcPower(sides[2]) calcPower sides[2] sides 2 {
			return true;
		} return true; true return false; false int[] sides sides /**
	 * String????????????int?????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getIntArray(String[] strArray) {
		int[] intArray = new int[3];
		for (int i = 0; i < 3; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	} getIntArray {
		int[] intArray = new int[3];
		for (int i = 0; i < 3; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	} int[] intArray = new int[3]; intArray new int[3] 3 for (int i = 0; i < 3; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
			intArray[i] = Integer.parseInt(strArray[i]);
		} {
			intArray[i] = Integer.parseInt(strArray[i]);
		} intArray[i] = Integer.parseInt(strArray[i]) intArray[i] intArray i Integer.parseInt(strArray[i]) Integer.parseInt Integer strArray[i] strArray i return intArray; intArray String[] strArray strArray /**
	 * ?????°???????????????????????´??????
	 *
	 * @param n
	 *            ???????????????
	 * @return ?????°??????????????????
	 */
	private static int calcPower(int n) {
		return n * n;
	} calcPower {
		return n * n;
	} return n * n; n * n n n int n n /**
	 * ????????°??????????????????????????´??????
	 *
	 * @param n
	 *            ??´??°1
	 * @param m
	 *            ??´??°2
	 * @return ????????°??????????????????
	 */
	private static int calcSumPower(int n, int m) {
		return calcPower(n) + calcPower(m);
	} calcSumPower {
		return calcPower(n) + calcPower(m);
	} return calcPower(n) + calcPower(m); calcPower(n) + calcPower(m) calcPower(n) calcPower n calcPower(m) calcPower m int n n int m m public class Main {

	/** YES:??´?§?????§???¢??§?????? */
	private static final String RIGHT_TRIANGLE = "YES";

	/** NO:??´?§?????§???¢??§????????? */
	private static final String NOT_RIGHT_TRIANGLE = "NO";

	/**
	 * AOJ Is it a Right Triangle?
	 *
	 * @param args
	 * @throws IOException
	 *             ??\?????¨??????
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		int numsOfDataSets = Integer.parseInt(bufferedReader.readLine());

		for (int i = 0; i < numsOfDataSets; i++) {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		}

		bufferedReader.close();
	}

	/**
	 * 3???????????????????????´?§?????§???¢????????????????????????
	 *
	 * @param triangle
	 * @return
	 */
	private static boolean isRightTriangle(int[] sides) {

		Arrays.sort(sides);
		if (calcSumPower(sides[0], sides[1]) == calcPower(sides[2])) {
			return true;
		}
		return false;
	}

	/**
	 * String????????????int?????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getIntArray(String[] strArray) {
		int[] intArray = new int[3];
		for (int i = 0; i < 3; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	}

	/**
	 * ?????°???????????????????????´??????
	 *
	 * @param n
	 *            ???????????????
	 * @return ?????°??????????????????
	 */
	private static int calcPower(int n) {
		return n * n;
	}

	/**
	 * ????????°??????????????????????????´??????
	 *
	 * @param n
	 *            ??´??°1
	 * @param m
	 *            ??´??°2
	 * @return ????????°??????????????????
	 */
	private static int calcSumPower(int n, int m) {
		return calcPower(n) + calcPower(m);
	}

} public class Main {

	/** YES:??´?§?????§???¢??§?????? */
	private static final String RIGHT_TRIANGLE = "YES";

	/** NO:??´?§?????§???¢??§????????? */
	private static final String NOT_RIGHT_TRIANGLE = "NO";

	/**
	 * AOJ Is it a Right Triangle?
	 *
	 * @param args
	 * @throws IOException
	 *             ??\?????¨??????
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		int numsOfDataSets = Integer.parseInt(bufferedReader.readLine());

		for (int i = 0; i < numsOfDataSets; i++) {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		}

		bufferedReader.close();
	}

	/**
	 * 3???????????????????????´?§?????§???¢????????????????????????
	 *
	 * @param triangle
	 * @return
	 */
	private static boolean isRightTriangle(int[] sides) {

		Arrays.sort(sides);
		if (calcSumPower(sides[0], sides[1]) == calcPower(sides[2])) {
			return true;
		}
		return false;
	}

	/**
	 * String????????????int?????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getIntArray(String[] strArray) {
		int[] intArray = new int[3];
		for (int i = 0; i < 3; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	}

	/**
	 * ?????°???????????????????????´??????
	 *
	 * @param n
	 *            ???????????????
	 * @return ?????°??????????????????
	 */
	private static int calcPower(int n) {
		return n * n;
	}

	/**
	 * ????????°??????????????????????????´??????
	 *
	 * @param n
	 *            ??´??°1
	 * @param m
	 *            ??´??°2
	 * @return ????????°??????????????????
	 */
	private static int calcSumPower(int n, int m) {
		return calcPower(n) + calcPower(m);
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

	/** YES:??´?§?????§???¢??§?????? */
	private static final String RIGHT_TRIANGLE = "YES";

	/** NO:??´?§?????§???¢??§????????? */
	private static final String NOT_RIGHT_TRIANGLE = "NO";

	/**
	 * AOJ Is it a Right Triangle?
	 *
	 * @param args
	 * @throws IOException
	 *             ??\?????¨??????
	 */
	public static void main(String[] args) throws IOException {
		BufferedReader bufferedReader = new BufferedReader(
				new InputStreamReader(System.in));

		int numsOfDataSets = Integer.parseInt(bufferedReader.readLine());

		for (int i = 0; i < numsOfDataSets; i++) {
			String[] triangle = bufferedReader.readLine().split("\\s");

			int[] sides = getIntArray(triangle);
			if (isRightTriangle(sides)) {
				System.out.println(RIGHT_TRIANGLE);
			} else {
				System.out.println(NOT_RIGHT_TRIANGLE);
			}
		}

		bufferedReader.close();
	}

	/**
	 * 3???????????????????????´?§?????§???¢????????????????????????
	 *
	 * @param triangle
	 * @return
	 */
	private static boolean isRightTriangle(int[] sides) {

		Arrays.sort(sides);
		if (calcSumPower(sides[0], sides[1]) == calcPower(sides[2])) {
			return true;
		}
		return false;
	}

	/**
	 * String????????????int?????????????????????????????´??????
	 *
	 * @param strArray
	 *            String?????????
	 * @return int?????????
	 */
	private static int[] getIntArray(String[] strArray) {
		int[] intArray = new int[3];
		for (int i = 0; i < 3; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	}

	/**
	 * ?????°???????????????????????´??????
	 *
	 * @param n
	 *            ???????????????
	 * @return ?????°??????????????????
	 */
	private static int calcPower(int n) {
		return n * n;
	}

	/**
	 * ????????°??????????????????????????´??????
	 *
	 * @param n
	 *            ??´??°1
	 * @param m
	 *            ??´??°2
	 * @return ????????°??????????????????
	 */
	private static int calcSumPower(int n, int m) {
		return calcPower(n) + calcPower(m);
	}

}