import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++){
			String line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO");
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++){
			String line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO");
		}
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++){
			String line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO");
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++){
			String line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)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 line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)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 line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO");
		} {
			String line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO");
		} String line = br.readLine(); line br.readLine() br.readLine br String[] str = line.split(" "); str line.split(" ") line.split line " " int[] m = new int[3]; m new int[3] 3 int max=0; max 0 for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			} int j=0; int j=0; j 0 j<3 j 3 j++ j++ j {
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			} {
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			} m[j]=Integer.parseInt(str[j]) m[j] m j Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j if(m[j]>max)max=m[j]; m[j]>max m[j] m j max max=m[j] max m[j] m j int tmp=0; tmp 0 for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j]; int j=0; int j=0; j 0 j<3 j 3 j++ j++ j if(m[j]!=max)tmp+=m[j]*m[j]; if(m[j]!=max)tmp+=m[j]*m[j]; m[j]!=max m[j] m j max tmp+=m[j]*m[j] tmp m[j]*m[j] m[j] m j m[j] m j if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO"); max*max==tmp max*max max max tmp System.out.println("YES") System.out.println System.out System System.out "YES" 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 Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++){
			String line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO");
		}
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++){
			String line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO");
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++){
			String line = br.readLine();
			String[] str = line.split(" ");
			int[] m = new int[3];
			int max=0;
			for(int j=0;j<3;j++){
				m[j]=Integer.parseInt(str[j]);
				if(m[j]>max)max=m[j];
			}
			int tmp=0;
			for(int j=0;j<3;j++)if(m[j]!=max)tmp+=m[j]*m[j];
			if(max*max==tmp)System.out.println("YES");
			else System.out.println("NO");
		}
	}
}