import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } catch (IOException ex) {
            System.out.println("error");
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } catch (IOException ex) {
            System.out.println("error");
        }
    }
} Main public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } catch (IOException ex) {
            System.out.println("error");
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } catch (IOException ex) {
            System.out.println("error");
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } catch (IOException ex) {
            System.out.println("error");
        } catch (IOException ex) {
            System.out.println("error");
        } IOException ex {
            System.out.println("error");
        } System.out.println("error") System.out.println System.out System System.out "error" {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } int x = Integer.parseInt(br.readLine()); x Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int i = 0; i 0 while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            } i < x i x {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            } String str = br.readLine(); str br.readLine() br.readLine br String[] num = str.split(" ", 0); num str.split(" ", 0) str.split str " " 0 ArrayList<Integer> al = new ArrayList<>(); al new ArrayList<>() for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                } int j = 0; int j = 0; j 0 j < 3 j 3 j++ j++ j {
                    al.add(Integer.parseInt(num[j]));
                } {
                    al.add(Integer.parseInt(num[j]));
                } al.add(Integer.parseInt(num[j])) al.add al Integer.parseInt(num[j]) Integer.parseInt Integer num[j] num j Collections.sort(al) Collections.sort Collections al int a = al.get(0); a al.get(0) al.get al 0 int b = al.get(1); b al.get(1) al.get al 1 int c = al.get(2); c al.get(2) al.get al 2 if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                } c*c==a*a+b*b c*c c c a*a+b*b a*a a a b*b b b {
                    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" i++ i String[] args args public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } catch (IOException ex) {
            System.out.println("error");
        }
    }
} public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } catch (IOException ex) {
            System.out.println("error");
        }
    }
} Main
import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try {
            int x = Integer.parseInt(br.readLine());
            int i = 0;
            while (i < x) {
                String str = br.readLine();
                String[] num = str.split(" ", 0);
                ArrayList<Integer> al = new ArrayList<>();
                for (int j = 0; j < 3; j++) {
                    al.add(Integer.parseInt(num[j]));
                }
                Collections.sort(al);
                int a = al.get(0);
                int b = al.get(1);
                int c = al.get(2);
                if(c*c==a*a+b*b){
                    System.out.println("YES");
                }else{
                    System.out.println("NO");
                }
                i++;
            }
        } catch (IOException ex) {
            System.out.println("error");
        }
    }
}