
import java.util.*;
import java.lang.*;
import java.math.*;

class Main {

	Scanner sc = new Scanner(System.in);

	void run() {
		
		int[] x = new int[3];
		
		int n = sc.nextInt();
		
		for (int i=0;i<n;i++) {
			
			for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			}
			
			Arrays.sort(x);
			
			if ( x[0] + x[1] == x[2] )
				System.out.println("YES");
			else
				System.out.println("NO");
			
			
		}
		
		return;

	}

	public static void main(String[] args) {
		new Main().run();
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.math.*; math.* java class Main {

	Scanner sc = new Scanner(System.in);

	void run() {
		
		int[] x = new int[3];
		
		int n = sc.nextInt();
		
		for (int i=0;i<n;i++) {
			
			for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			}
			
			Arrays.sort(x);
			
			if ( x[0] + x[1] == x[2] )
				System.out.println("YES");
			else
				System.out.println("NO");
			
			
		}
		
		return;

	}

	public static void main(String[] args) {
		new Main().run();
	}
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) void run() {
		
		int[] x = new int[3];
		
		int n = sc.nextInt();
		
		for (int i=0;i<n;i++) {
			
			for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			}
			
			Arrays.sort(x);
			
			if ( x[0] + x[1] == x[2] )
				System.out.println("YES");
			else
				System.out.println("NO");
			
			
		}
		
		return;

	} run {
		
		int[] x = new int[3];
		
		int n = sc.nextInt();
		
		for (int i=0;i<n;i++) {
			
			for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			}
			
			Arrays.sort(x);
			
			if ( x[0] + x[1] == x[2] )
				System.out.println("YES");
			else
				System.out.println("NO");
			
			
		}
		
		return;

	} int[] x = new int[3]; x new int[3] 3 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i=0;i<n;i++) {
			
			for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			}
			
			Arrays.sort(x);
			
			if ( x[0] + x[1] == x[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 {
			
			for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			}
			
			Arrays.sort(x);
			
			if ( x[0] + x[1] == x[2] )
				System.out.println("YES");
			else
				System.out.println("NO");
			
			
		} {
			
			for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			}
			
			Arrays.sort(x);
			
			if ( x[0] + x[1] == x[2] )
				System.out.println("YES");
			else
				System.out.println("NO");
			
			
		} for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			} {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			} x[j] = sc.nextInt() x[j] x j sc.nextInt() sc.nextInt sc x[j] *= x[j] x[j] x j x[j] x j Arrays.sort(x) Arrays.sort Arrays x if ( x[0] + x[1] == x[2] )
				System.out.println("YES");
			else
				System.out.println("NO"); x[0] + x[1] == x[2] x[0] + x[1] x[0] x 0 x[1] x 1 x[2] x 2 System.out.println("YES") System.out.println System.out System System.out "YES" System.out.println("NO") System.out.println System.out System System.out "NO" return; public static void main(String[] args) {
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args

import java.util.*;
import java.lang.*;
import java.math.*;

class Main {

	Scanner sc = new Scanner(System.in);

	void run() {
		
		int[] x = new int[3];
		
		int n = sc.nextInt();
		
		for (int i=0;i<n;i++) {
			
			for (int j=0; j<3;j++) {
				
				x[j] = sc.nextInt();
				x[j] *= x[j];
				
			}
			
			Arrays.sort(x);
			
			if ( x[0] + x[1] == x[2] )
				System.out.println("YES");
			else
				System.out.println("NO");
			
			
		}
		
		return;

	}

	public static void main(String[] args) {
		new Main().run();
	}
}