import java.util.*;

public class Main{
    Main(){
	Scanner sc = new Scanner(System.in);
	int[] a = new int[3];

	while(sc.hasNext()){
	    int n = sc.nextInt();
	    for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    }
	}
    }
    public static void main(String[] args){
	new Main();
    }
} import java.util.*; util.* java public class Main{
    Main(){
	Scanner sc = new Scanner(System.in);
	int[] a = new int[3];

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

	while(sc.hasNext()){
	    int n = sc.nextInt();
	    for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    }
	}
    } Main {
	Scanner sc = new Scanner(System.in);
	int[] a = new int[3];

	while(sc.hasNext()){
	    int n = sc.nextInt();
	    for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    }
	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] a = new int[3]; a new int[3] 3 while(sc.hasNext()){
	    int n = sc.nextInt();
	    for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    }
	} sc.hasNext() sc.hasNext sc {
	    int n = sc.nextInt();
	    for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    }
	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    } int cs = 0; int cs = 0; cs 0 cs < n cs n cs++ cs++ cs {
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    } {
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    } for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		} int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		} {
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		} a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc a[i] *= a[i] a[i] a i a[i] a i Arrays.sort(a) Arrays.sort Arrays a String s = "NO"; s "NO" if(a[0]+a[1] == a[2]) s = "YES"; a[0]+a[1] == a[2] a[0]+a[1] a[0] a 0 a[1] a 1 a[2] a 2 s = "YES" s "YES" System.out.println(s) System.out.println System.out System System.out s public static void main(String[] args){
	new Main();
    } main {
	new Main();
    } new Main() String[] args args public class Main{
    Main(){
	Scanner sc = new Scanner(System.in);
	int[] a = new int[3];

	while(sc.hasNext()){
	    int n = sc.nextInt();
	    for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    }
	}
    }
    public static void main(String[] args){
	new Main();
    }
} public class Main{
    Main(){
	Scanner sc = new Scanner(System.in);
	int[] a = new int[3];

	while(sc.hasNext()){
	    int n = sc.nextInt();
	    for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    }
	}
    }
    public static void main(String[] args){
	new Main();
    }
} Main
import java.util.*;

public class Main{
    Main(){
	Scanner sc = new Scanner(System.in);
	int[] a = new int[3];

	while(sc.hasNext()){
	    int n = sc.nextInt();
	    for(int cs = 0; cs < n; cs++){
		for(int i = 0; i < 3; i++){
		    a[i] = sc.nextInt();
		    a[i] *= a[i];
		}
		Arrays.sort(a);
		String s = "NO";
		if(a[0]+a[1] == a[2]) s = "YES";
		System.out.println(s); 
	    }
	}
    }
    public static void main(String[] args){
	new Main();
    }
}