import java.util.Scanner;

 public class Main{
	 public static void main(String[] args){
		 Scanner s = new Scanner(System.in);
		 int b,x,max,SH;
		 SH = 0;
		 while(s.hasNextInt()){
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 }
	 }
 } import java.util.Scanner; Scanner java.util public class Main{
	 public static void main(String[] args){
		 Scanner s = new Scanner(System.in);
		 int b,x,max,SH;
		 SH = 0;
		 while(s.hasNextInt()){
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 }
	 }
 } Main public static void main(String[] args){
		 Scanner s = new Scanner(System.in);
		 int b,x,max,SH;
		 SH = 0;
		 while(s.hasNextInt()){
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 }
	 } main {
		 Scanner s = new Scanner(System.in);
		 int b,x,max,SH;
		 SH = 0;
		 while(s.hasNextInt()){
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 }
	 } Scanner s = new Scanner(System.in); s new Scanner(System.in) int b b x x max max SH; SH SH = 0 SH 0 while(s.hasNextInt()){
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 } s.hasNextInt() s.hasNextInt s {
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 } x = s.nextInt() x s.nextInt() s.nextInt s int[][] a = new int[x][3]; a new int[x][3] x 3 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 } b = 0; b = 0 b 0 b < x b x b++ b++ b {
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 } {
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 } a[b][0] = s.nextInt() a[b][0] a[b] a b 0 s.nextInt() s.nextInt s a[b][1] = s.nextInt() a[b][1] a[b] a b 1 s.nextInt() s.nextInt s a[b][2] = s.nextInt() a[b][2] a[b] a b 2 s.nextInt() s.nextInt s for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 } b = 0; b = 0 b 0 b < x b x b++ b++ b {
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 } {
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 } max = a[b][0] max a[b][0] a[b] a b 0 if(a[b][1] > max)max = a[b][1]; a[b][1] > max a[b][1] a[b] a b 1 max max = a[b][1] max a[b][1] a[b] a b 1 if(a[b][2] > max)max = a[b][2]; a[b][2] > max a[b][2] a[b] a b 2 max max = a[b][2] max a[b][2] a[b] a b 2 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 } max == a[b][0] max a[b][0] a[b] a b 0 {
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 } SH = a[b][1]*a[b][1]+a[b][2]*a[b][2] SH a[b][1]*a[b][1]+a[b][2]*a[b][2] a[b][1]*a[b][1] a[b][1] a[b] a b 1 a[b][1] a[b] a b 1 a[b][2]*a[b][2] a[b][2] a[b] a b 2 a[b][2] a[b] a b 2 if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 } max == a[b][1] max a[b][1] a[b] a b 1 {
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 } SH = a[b][0]*a[b][0]+a[b][2]*a[b][2] SH a[b][0]*a[b][0]+a[b][2]*a[b][2] a[b][0]*a[b][0] a[b][0] a[b] a b 0 a[b][0] a[b] a b 0 a[b][2]*a[b][2] a[b][2] a[b] a b 2 a[b][2] a[b] a b 2 if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 } max == a[b][2] max a[b][2] a[b] a b 2 {
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 } SH = a[b][0]*a[b][0]+a[b][1]*a[b][1] SH a[b][0]*a[b][0]+a[b][1]*a[b][1] a[b][0]*a[b][0] a[b][0] a[b] a b 0 a[b][0] a[b] a b 0 a[b][1]*a[b][1] a[b][1] a[b] a b 1 a[b][1] a[b] a b 1 max = max*max max max*max max max if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 } SH == max SH max {
				 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[] args args public class Main{
	 public static void main(String[] args){
		 Scanner s = new Scanner(System.in);
		 int b,x,max,SH;
		 SH = 0;
		 while(s.hasNextInt()){
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 }
	 }
 } public class Main{
	 public static void main(String[] args){
		 Scanner s = new Scanner(System.in);
		 int b,x,max,SH;
		 SH = 0;
		 while(s.hasNextInt()){
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 }
	 }
 } Main
import java.util.Scanner;

 public class Main{
	 public static void main(String[] args){
		 Scanner s = new Scanner(System.in);
		 int b,x,max,SH;
		 SH = 0;
		 while(s.hasNextInt()){
		 x = s.nextInt();
		 int[][] a = new int[x][3];
		 for(b = 0; b < x; b++){
			 a[b][0] = s.nextInt();
			 a[b][1] = s.nextInt();
			 a[b][2] = s.nextInt();
		 }
		 for(b = 0; b < x; b++){
			 max = a[b][0];
			 if(a[b][1] > max)max = a[b][1];
			 if(a[b][2] > max)max = a[b][2];
			 if(max == a[b][0]){
				 SH = a[b][1]*a[b][1]+a[b][2]*a[b][2];
			 }else if(max == a[b][1]){
				 SH = a[b][0]*a[b][0]+a[b][2]*a[b][2];
			 }else if(max == a[b][2]){
				 SH = a[b][0]*a[b][0]+a[b][1]*a[b][1];
			 }
			 max = max*max;
			 if(SH == max){
				 System.out.println("YES");
			 }else{
				 System.out.println("NO");
			 }
		 }
		 }
	 }
 }