import java.io.*;
public class Main{

    public static int[] sort(String s[]){
        int[] sides = new int[s.length];
        for(int i = 0;i < s.length; i++){
            sides[i] = Integer.parseInt(s[i]);
        }
        for(int j = 1;j < sides.length; j++){
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        }
        return sides;
    }
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int num = Integer.parseInt(str);
        while(num <= 0 || num > 1000){
            str = br.readLine();
            num = Integer.parseInt(str);
        }
        String str1;
        String side[][];
        side = new String[num][];
        int sides[][];
        sides = new int[num][];
        int a = 0;
        while(a != num){
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        }
        for(int k = 0;k < num;k++){
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} import java.io.*; io.* java public class Main{

    public static int[] sort(String s[]){
        int[] sides = new int[s.length];
        for(int i = 0;i < s.length; i++){
            sides[i] = Integer.parseInt(s[i]);
        }
        for(int j = 1;j < sides.length; j++){
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        }
        return sides;
    }
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int num = Integer.parseInt(str);
        while(num <= 0 || num > 1000){
            str = br.readLine();
            num = Integer.parseInt(str);
        }
        String str1;
        String side[][];
        side = new String[num][];
        int sides[][];
        sides = new int[num][];
        int a = 0;
        while(a != num){
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        }
        for(int k = 0;k < num;k++){
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} Main public static int[] sort(String s[]){
        int[] sides = new int[s.length];
        for(int i = 0;i < s.length; i++){
            sides[i] = Integer.parseInt(s[i]);
        }
        for(int j = 1;j < sides.length; j++){
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        }
        return sides;
    } sort {
        int[] sides = new int[s.length];
        for(int i = 0;i < s.length; i++){
            sides[i] = Integer.parseInt(s[i]);
        }
        for(int j = 1;j < sides.length; j++){
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        }
        return sides;
    } int[] sides = new int[s.length]; sides new int[s.length] s.length s s.length for(int i = 0;i < s.length; i++){
            sides[i] = Integer.parseInt(s[i]);
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            sides[i] = Integer.parseInt(s[i]);
        } {
            sides[i] = Integer.parseInt(s[i]);
        } sides[i] = Integer.parseInt(s[i]) sides[i] sides i Integer.parseInt(s[i]) Integer.parseInt Integer s[i] s i for(int j = 1;j < sides.length; j++){
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        } int j = 1; int j = 1; j 1 j < sides.length j sides.length sides sides.length j++ j++ j {
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        } {
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        } if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            } sides[0] < sides[j] sides[0] sides 0 sides[j] sides j {
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            } int n = sides[0]; n sides[0] sides 0 sides[0] = sides[j] sides[0] sides 0 sides[j] sides j sides[j] = n sides[j] sides j n return sides; sides String s[] s public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int num = Integer.parseInt(str);
        while(num <= 0 || num > 1000){
            str = br.readLine();
            num = Integer.parseInt(str);
        }
        String str1;
        String side[][];
        side = new String[num][];
        int sides[][];
        sides = new int[num][];
        int a = 0;
        while(a != num){
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        }
        for(int k = 0;k < num;k++){
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int num = Integer.parseInt(str);
        while(num <= 0 || num > 1000){
            str = br.readLine();
            num = Integer.parseInt(str);
        }
        String str1;
        String side[][];
        side = new String[num][];
        int sides[][];
        sides = new int[num][];
        int a = 0;
        while(a != num){
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        }
        for(int k = 0;k < num;k++){
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br int num = Integer.parseInt(str); num Integer.parseInt(str) Integer.parseInt Integer str while(num <= 0 || num > 1000){
            str = br.readLine();
            num = Integer.parseInt(str);
        } num <= 0 || num > 1000 num <= 0 num 0 num > 1000 num 1000 {
            str = br.readLine();
            num = Integer.parseInt(str);
        } str = br.readLine() str br.readLine() br.readLine br num = Integer.parseInt(str) num Integer.parseInt(str) Integer.parseInt Integer str String str1; str1 String side[][]; side side = new String[num][] side new String[num][] num int sides[][]; sides sides = new int[num][] sides new int[num][] num int a = 0; a 0 while(a != num){
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        } a != num a num {
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        } str1 = br.readLine() str1 br.readLine() br.readLine br side[a] = str1.split(" ", 3) side[a] side a str1.split(" ", 3) str1.split str1 " " 3 sides[a] = sort(side[a]) sides[a] sides a sort(side[a]) sort side[a] side a a++ a for(int k = 0;k < num;k++){
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        } int k = 0; int k = 0; k 0 k < num k num k++ k++ k {
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        } {
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        } if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            } sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1] sides[k][0]*sides[k][0] sides[k][0] sides[k] sides k 0 sides[k][0] sides[k] sides k 0 sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1] sides[k][2]*sides[k][2] sides[k][2] sides[k] sides k 2 sides[k][2] sides[k] sides k 2 sides[k][1]*sides[k][1] sides[k][1] sides[k] sides k 1 sides[k][1] sides[k] sides k 1 {
                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 int[] sort(String s[]){
        int[] sides = new int[s.length];
        for(int i = 0;i < s.length; i++){
            sides[i] = Integer.parseInt(s[i]);
        }
        for(int j = 1;j < sides.length; j++){
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        }
        return sides;
    }
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int num = Integer.parseInt(str);
        while(num <= 0 || num > 1000){
            str = br.readLine();
            num = Integer.parseInt(str);
        }
        String str1;
        String side[][];
        side = new String[num][];
        int sides[][];
        sides = new int[num][];
        int a = 0;
        while(a != num){
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        }
        for(int k = 0;k < num;k++){
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} public class Main{

    public static int[] sort(String s[]){
        int[] sides = new int[s.length];
        for(int i = 0;i < s.length; i++){
            sides[i] = Integer.parseInt(s[i]);
        }
        for(int j = 1;j < sides.length; j++){
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        }
        return sides;
    }
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int num = Integer.parseInt(str);
        while(num <= 0 || num > 1000){
            str = br.readLine();
            num = Integer.parseInt(str);
        }
        String str1;
        String side[][];
        side = new String[num][];
        int sides[][];
        sides = new int[num][];
        int a = 0;
        while(a != num){
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        }
        for(int k = 0;k < num;k++){
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
} Main
import java.io.*;
public class Main{

    public static int[] sort(String s[]){
        int[] sides = new int[s.length];
        for(int i = 0;i < s.length; i++){
            sides[i] = Integer.parseInt(s[i]);
        }
        for(int j = 1;j < sides.length; j++){
            if(sides[0] < sides[j]){
                int n = sides[0];
                sides[0] = sides[j];
                sides[j] = n;
            }
        }
        return sides;
    }
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        int num = Integer.parseInt(str);
        while(num <= 0 || num > 1000){
            str = br.readLine();
            num = Integer.parseInt(str);
        }
        String str1;
        String side[][];
        side = new String[num][];
        int sides[][];
        sides = new int[num][];
        int a = 0;
        while(a != num){
            str1 = br.readLine();
            side[a] = str1.split(" ", 3);
            sides[a] = sort(side[a]);
            a++;
        }
        for(int k = 0;k < num;k++){
             if(sides[k][0]*sides[k][0] == sides[k][2]*sides[k][2] +sides[k][1]*sides[k][1]){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
}