import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		boolean[] arg = null;
		int length=0;
        int i=0;
        boolean first=true;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        }
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		boolean[] arg = null;
		int length=0;
        int i=0;
        boolean first=true;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        }
	}

} Main public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		boolean[] arg = null;
		int length=0;
        int i=0;
        boolean first=true;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        }
	} main {
		// TODO ?????????????????????????????????????????????
		boolean[] arg = null;
		int length=0;
        int i=0;
        boolean first=true;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        }
	} boolean[] arg = null; arg null int length=0; length 0 int i=0; i 0 boolean first=true; first true try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        } {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String line; line while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            } (line = br.readLine()) != null (line = br.readLine()) line br.readLine() br.readLine br null {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            } if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	} first {
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	} length=Integer.parseInt(line) length Integer.parseInt(line) Integer.parseInt Integer line arg=new boolean[length] arg new boolean[length] length first=false first false {
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	} String[] tokens = line.split(" "); tokens line.split(" ") line.split line " " int max max mid mid min; min int a= Integer.parseInt(tokens[0]); a Integer.parseInt(tokens[0]) Integer.parseInt Integer tokens[0] tokens 0 int b = Integer.parseInt(tokens[1]); b Integer.parseInt(tokens[1]) Integer.parseInt Integer tokens[1] tokens 1 int c = Integer.parseInt(tokens[2]); c Integer.parseInt(tokens[2]) Integer.parseInt Integer tokens[2] tokens 2 max=Integer.max(Integer.max(a, b),Integer.max(c, b)) max Integer.max(Integer.max(a, b),Integer.max(c, b)) Integer.max Integer Integer.max(a, b) Integer.max Integer a b Integer.max(c, b) Integer.max Integer c b min=Integer.min(Integer.min(a, b),Integer.min(c, b)) min Integer.min(Integer.min(a, b),Integer.min(c, b)) Integer.min Integer Integer.min(a, b) Integer.min Integer a b Integer.min(c, b) Integer.min Integer c b if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	} max!=a&&min!=a max!=a max a min!=a min a {
            			mid=a;
            		} mid=a mid a if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	} max!=b&&min!=b max!=b max b min!=b min b {
            			mid=b;
            		} mid=b mid b if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	} max!=c&&min!=c max!=c max c min!=c min c {
            			mid=c;
                	} mid=c mid c {
                		mid=a;
                	} mid=a mid a arg[i]=max*max==min*min+mid*mid arg[i] arg i max*max==min*min+mid*mid max*max max max min*min+mid*mid min*min min min mid*mid mid mid i++ i if(i==length){
            			break;
            		} i==length i length {
            			break;
            		} break; for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            } int j=0; int j=0; j 0 j<i j i j++ j++ j {
            	System.out.println(arg[j]?"YES":"NO");
            } {
            	System.out.println(arg[j]?"YES":"NO");
            } System.out.println(arg[j]?"YES":"NO") System.out.println System.out System System.out arg[j]?"YES":"NO" arg[j] arg j "YES" "NO" String[] args args public class Main{

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		boolean[] arg = null;
		int length=0;
        int i=0;
        boolean first=true;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        }
	}

} public class Main{

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		boolean[] arg = null;
		int length=0;
        int i=0;
        boolean first=true;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        }
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		boolean[] arg = null;
		int length=0;
        int i=0;
        boolean first=true;
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null) {
            	if(first){
            		length=Integer.parseInt(line);
            		arg=new boolean[length];
            		first=false;
            	}else{
            		String[] tokens = line.split(" ");
            		int max,mid,min;
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		max=Integer.max(Integer.max(a, b),Integer.max(c, b));
            		min=Integer.min(Integer.min(a, b),Integer.min(c, b));
            		if(max!=a&&min!=a){
            			mid=a;
            		}else if(max!=b&&min!=b){
            			mid=b;
            		}else if(max!=c&&min!=c){
            			mid=c;
                	}else{
                		mid=a;
                	}
            		arg[i]=max*max==min*min+mid*mid;
            		i++;
            		if(i==length){
            			break;
            		}
            	}
            }
            for(int j=0;j<i;j++){
            	System.out.println(arg[j]?"YES":"NO");
            }
        }
	}

}