

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i = 0 ; i < n;i++){
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}	
		
		
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util public class Main {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i = 0 ; i < n;i++){
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}	
		
		
	}

} Main public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i = 0 ; i < n;i++){
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}	
		
		
	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i = 0 ; i < n;i++){
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}	
		
		
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0 ; i < n;i++){
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} {
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		} String[] s = br.readLine().split(" "); s br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " ArrayList<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			} int j =0; int j =0; j 0 j < s.length j s.length s s.length j++ j++ j {
				list.add(Integer.parseInt(s[j]));
			} {
				list.add(Integer.parseInt(s[j]));
			} list.add(Integer.parseInt(s[j])) list.add list Integer.parseInt(s[j]) Integer.parseInt Integer s[j] s j Collections.sort(list) Collections.sort Collections list int a = list.get(0); a list.get(0) list.get list 0 int b = list.get(1); b list.get(1) list.get list 1 int c = list.get(2); c list.get(2) list.get list 2 if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			} a*a + b*b == c*c a*a + b*b a*a a a b*b b b c*c c c {
				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 void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i = 0 ; i < n;i++){
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}	
		
		
	}

} public class Main {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i = 0 ; i < n;i++){
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}	
		
		
	}

} Main


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i = 0 ; i < n;i++){
			String[] s = br.readLine().split(" ");
			ArrayList<Integer> list = new ArrayList<Integer>();
			for(int j =0;j < s.length;j++){
				list.add(Integer.parseInt(s[j]));
			}
			Collections.sort(list);
			int a = list.get(0);
			int b = list.get(1);
			int c = list.get(2);
			if(a*a + b*b == c*c){
				System.out.println("YES");
			}else{
				System.out.println("NO");
			}
		}	
		
		
	}

}