import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int k=0; k<n; k++){
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.math.*; math.* java import java.io.*; io.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.util.Arrays.*; import static java.util.Arrays.*; import static java.util.Arrays.*; public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int k=0; k<n; k++){
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
} Main Scanner sc; sc static final int INF=1<<28; INF 1<<28 1 28 static final double EPS=1e-9; EPS 1e-9 void run(){
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int k=0; k<n; k++){
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		}
		sc.close();
	} run {
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int k=0; k<n; k++){
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		}
		sc.close();
	} sc=new Scanner(System.in) sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int k=0; k<n; k++){
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		} int k=0; int k=0; k 0 k<n k n k++ k++ k {
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		} {
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		} int[] a=new int[3]; a new int[3] 3 for(int i=0; i<3; i++)
				a[i]=sc.nextInt(); int i=0; int i=0; i 0 i<3 i 3 i++ i++ i a[i]=sc.nextInt(); a[i]=sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc sort(a) sort a if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO"); a[0]*a[0]+a[1]*a[1]==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 a[2]*a[2] a[2] a 2 a[2] a 2 println("YES") println "YES" println("NO") println "NO" sc.close() sc.close sc void print(String s){
		System.out.print(s);
	} print {
		System.out.print(s);
	} System.out.print(s) System.out.print System.out System System.out s String s s void println(String s){
		System.out.println(s);
	} println {
		System.out.println(s);
	} System.out.println(s) System.out.println System.out System System.out s String s s public static void main(String[] args){
		new Main().run();
	} main {
		new Main().run();
	} new Main().run() new Main().run new Main() String[] args args public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int k=0; k<n; k++){
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
} public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int k=0; k<n; k++){
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
} Main
import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int k=0; k<n; k++){
			int[] a=new int[3];
			for(int i=0; i<3; i++)
				a[i]=sc.nextInt();
			sort(a);
			if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])
				println("YES");
			else
				println("NO");
		}
		sc.close();
	}

	void print(String s){
		System.out.print(s);
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		new Main().run();
	}
}