import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) {
		try {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		}catch(Exception e){
			System.out.println(e);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {
	public static void main(String[] args) {
		try {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		}catch(Exception e){
			System.out.println(e);
		}
	}
} Main public static void main(String[] args) {
		try {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		}catch(Exception e){
			System.out.println(e);
		}
	} main {
		try {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		}catch(Exception e){
			System.out.println(e);
		}
	} try {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		}catch(Exception e){
			System.out.println(e);
		} catch(Exception e){
			System.out.println(e);
		} Exception e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		} Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)"); pattern Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)") Pattern.compile Pattern "([0-9]+) *([0-9]+) *([0-9]+)" BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); bf new BufferedReader(new InputStreamReader(System.in)) Matcher matcher; matcher ArrayList<Integer> l = new ArrayList<Integer>(); l new ArrayList<Integer>() int n=Integer.parseInt(bf.readLine()); n Integer.parseInt(bf.readLine()) Integer.parseInt Integer bf.readLine() bf.readLine bf for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			} {
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			} matcher = pattern.matcher(bf.readLine()) matcher pattern.matcher(bf.readLine()) pattern.matcher pattern bf.readLine() bf.readLine bf if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				} matcher.matches() matcher.matches matcher {
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				} for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					} int j=1; int j=1; j 1 j<=3 j 3 j++ j++ j {
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					} {
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					} l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j))) l.add l Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)) Integer.parseInt(matcher.group(j)) Integer.parseInt Integer matcher.group(j) matcher.group matcher j Integer.parseInt(matcher.group(j)) Integer.parseInt Integer matcher.group(j) matcher.group matcher j Collections.sort(l) Collections.sort Collections l if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					} l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue() l.get(0).intValue()+l.get(1).intValue() l.get(0).intValue() l.get(0).intValue l.get(0) l.get l 0 l.get(1).intValue() l.get(1).intValue l.get(1) l.get l 1 l.get(2).intValue() l.get(2).intValue l.get(2) l.get l 2 {
						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" l.clear() l.clear l String[] args args public class Main {
	public static void main(String[] args) {
		try {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		}catch(Exception e){
			System.out.println(e);
		}
	}
} public class Main {
	public static void main(String[] args) {
		try {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		}catch(Exception e){
			System.out.println(e);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) {
		try {
			Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+) *([0-9]+)");
			BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
			Matcher matcher;
			ArrayList<Integer> l = new ArrayList<Integer>();
			int n=Integer.parseInt(bf.readLine());
			for(int i=0;i<n;i++){
				matcher = pattern.matcher(bf.readLine());
				if(matcher.matches()){
					for(int j=1;j<=3;j++){
						l.add(Integer.parseInt(matcher.group(j))*Integer.parseInt(matcher.group(j)));
					}
					Collections.sort(l);
					if(l.get(0).intValue()+l.get(1).intValue() == l.get(2).intValue()){
						System.out.println("YES");
					}else{
						System.out.println("NO");
					}
					l.clear();
				}
			}
		}catch(Exception e){
			System.out.println(e);
		}
	}
}