import java.util.*;
import java.util.Scanner ; 
import java.math.BigInteger;

public class Main {
    public static void main(String[] args) {
        int t,n1,n2,n3;
        int [] a = new int[3];
        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        while(t>0){
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        }
    }
} import java.util.*; util.* java import java.util.Scanner ; Scanner java.util import java.math.BigInteger; BigInteger java.math public class Main {
    public static void main(String[] args) {
        int t,n1,n2,n3;
        int [] a = new int[3];
        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        while(t>0){
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        }
    }
} Main public static void main(String[] args) {
        int t,n1,n2,n3;
        int [] a = new int[3];
        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        while(t>0){
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        }
    } main {
        int t,n1,n2,n3;
        int [] a = new int[3];
        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        while(t>0){
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        }
    } int t t n1 n1 n2 n2 n3; n3 int [] a = new int[3]; a new int[3] 3 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) t = sc.nextInt() t sc.nextInt() sc.nextInt sc while(t>0){
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        } t>0 t 0 {
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        } t-- t n1 = sc.nextInt() n1 sc.nextInt() sc.nextInt sc n2 = sc.nextInt() n2 sc.nextInt() sc.nextInt sc n3 = sc.nextInt() n3 sc.nextInt() sc.nextInt sc a[0] = n1 a[0] a 0 n1 a[1] = n2 a[1] a 1 n2 a[2]=n3 a[2] a 2 n3 Arrays.sort(a) Arrays.sort Arrays a System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" ) System.out.println System.out System System.out (a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" (a[2]*a[2]==a[0]*a[0]+a[1]*a[1]) a[2]*a[2] a[2] a 2 a[2] a 2 a[0]*a[0]+a[1]*a[1] a[0]*a[0] a[0] a 0 a[0] a 0 a[1]*a[1] a[1] a 1 a[1] a 1 "YES" "NO" String[] args args public class Main {
    public static void main(String[] args) {
        int t,n1,n2,n3;
        int [] a = new int[3];
        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        while(t>0){
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        }
    }
} public class Main {
    public static void main(String[] args) {
        int t,n1,n2,n3;
        int [] a = new int[3];
        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        while(t>0){
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        }
    }
} Main
import java.util.*;
import java.util.Scanner ; 
import java.math.BigInteger;

public class Main {
    public static void main(String[] args) {
        int t,n1,n2,n3;
        int [] a = new int[3];
        Scanner sc = new Scanner(System.in);
        t = sc.nextInt();
        while(t>0){
            t--;
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            a[0] = n1 ; a[1] = n2 ; a[2]=n3;
            Arrays.sort(a);
            System.out.println((a[2]*a[2]==a[0]*a[0]+a[1]*a[1])? "YES" : "NO" );
        }
    }
}