Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i:=0; i<n; i++{
	    data := nextInts(3)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

C++: 
#include<stdio.h>
#include<math.h>
int main()
{
    int n,i;
    int a[1000],b[1000],c[1000];
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d%d%d",&a[i],&b[i],&c[i]);
    }
    for(i=0;i<n;i++){
        if((c[i]*c[i])==(a[i]*a[i]+b[i]*b[i])||(a[i]*a[i])==(b[i]*b[i]+c[i]*c[i])||(b[i]*b[i])==(a[i]*a[i]+c[i]*c[i])){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>

using namespace std;

int main (void)
{
	int n,a[3];

	cin >> n;

	for (int j = 0; j < n; j++)
	{
		for (int i = 0; i < 3; i++)
		{
			cin >> a[i];
		}

		sort (a,a + 3);

		if ((a[0] * a[0]) + (a[1] * a[1]) == (a[2] * a[2]))
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
		a[0] = 0;
		a[1] = 0;
		a[2] = 0;
	}
}

C++: #include <stdio.h>
int main()
{
	int a,b,c,n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(a>=b&&a>=c){
			if(a*a==b*b+c*c)
				printf("YES\n");
			else
				printf("NO\n");
		}
		else if(b>=a&&b>=c){
			if(b*b==a*a+c*c)
				printf("YES\n");
			else
				printf("NO\n");
		}
		else if(c>=b&&c>=a){
			if(c*c==b*b+a*a)
				printf("YES\n");
			else
				printf("NO\n");
		}
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

int main(void) {
    int n;
    vector<int> tri(3,0);
    cin >> n;
    for(int i=0; i<n; i++) {
        cin >> tri[0] >> tri[1] >> tri[2];
        sort(tri.begin(),tri.end(),greater<int>());
        if(tri[0]*tri[0] == tri[1]*tri[1] + tri[2]*tri[2]) {
            cout << "YES" << endl;
        }
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include <cstdio>

int main(){
	int N;
	scanf("%d", &N);
	for(int i = 0; i < N; i++){
		int a, b, c;
		scanf("%d %d %d\n", &a, &b, &c);
		puts(((a *a + b*b == c*c) || (a*a + c*c == b*b) || (b*b + c*c == a*a))?"YES":"NO");
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>

using namespace std;

double check_right_triangle(int a,int b,int c){
    return (pow(a,2) + pow(b,2) - pow(c,2))/(2 * a * b);
}

int main(void){
    int n,a,b,c;
    cin >> n;
    for(int i=0;i < n;i ++){
        cin >> a >> b >> c;
        if((check_right_triangle(a,b,c) *
            check_right_triangle(a,c,b) *
            check_right_triangle(b,c,a)) == 0){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int main(){
  int n;
  cin >> n;
  for(int i = 0;i<n;i++){
    int a, b, c;
    cin >> a >> b >> c;
    if(max({a,b,c}) == a && b * b + c * c == a * a){
      cout << "YES" << endl;
    }else if(max({a,b,c}) == b && a * a + c * c == b * b){
      cout << "YES" << endl;
    }else if(max({a,b,c}) == c && a * a + b * b == c * c){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <functional>
#include <cmath>
using namespace std;

int main() {

    int N;
    cin >> N;

    int a, b, c;

    for(int i = 0; i < N; i++) {
        cin >> a >> b >> c;

        vector<int> vec;

        vec.push_back(a);
        vec.push_back(b);
        vec.push_back(c);

        sort(vec.begin(), vec.end(), greater<int>());

        if(pow(vec[0], 2) == pow(vec[1], 2) + pow(vec[2], 2)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>

using namespace std;

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);

	int N;
	cin >> N;

	vector<int> n(3);
	while (N--)
	{
		cin >> n[0] >> n[1] >> n[2];

		sort(n.begin(), n.end());
		if (pow(n[0], 2) + pow(n[1], 2) == pow(n[2], 2))
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

C++: #include"iostream"
using namespace std;
int main()
{
	int n;
	cin>>n;
	while(n--)
	{
		int a,b,c;
		cin>>a>>b>>c;
		if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a)cout<<"YES"<<endl;
		else cou<<"NO"<<endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <stdbool.h>

int main(void)
{
    int n, a[2];
    bool flag = false;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d %d %d", &a[0], &a[1], &a[2]);
        for (int j = 0; j < 3; ++j) {
            if (a[j] * a[j] == (a[j + 1 % 3] * a[j + 1 % 3] + a[j + 2 % 3] * a[j + 2 % 3])) {
                flag = true;
            }
        }
        if (flag) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z;
	scanf("%d %d %d",&x,&y,&z);
	for(i=0;i<N;i++){
		if(x^2+y^2==z^2||x^2+z^2==y^2||y^2+z^2==x^2){
			printf("Yes\n");
		}
		else {
			printf("No\n");
		}
	}
	return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main()

{
    int n;
    cin>>n;
    int a,b,c;
    for(int i=0;i<n;i++)
    {
        cin>>a>>b>>c;
        int d=a*a;
        int e=b*b;
        int f=c*c;
        if((d==e+f)||(e==d+f)||(f==d+e))cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
    
    
int main()
{
      int a,b,c,n,index;
    
      index = 0; 
      cin >> n; 
      while(1)
      {
           cin >> a >> b >> c;       
           if( (a*a + b*b) == c*c)     
                   cout << "YES" << endl;
           else
                   cout << "NO" << endl;
         
          if(index == n)
                   break;     
    
          index++;
     }
    
     return 0;
}

C++: import java.util.*;
public class Main {
	public static void main(String[] args){
	 
	Scanner sc= new Scanner (System.in);
	int n = sc.nextInt();
	int i[];
	i = new int[3];
for(int a=0;a<=n;a++){	
		for(int d=0;d<3;d++ ){
			i[d]=sc.nextInt();
			Arrays.sort(i);
			if((i[2]*i[2])==(i[0]*i[0])+(i[1]*i[1])){
				System.out.println("Yes");
			}
			else System.out.println("No");	
			}	
		}
	
		
	 
	
	}

}

C++: #include <iostream>


int f(int a, int b,int c)
{
	if (a * a == b * b + c * c) {
		return 1;
	} else if (b * b == c * c + a * a) {
		return 1;
	} else if (c * c == a * a + b * b) {
		return 1;
	} else {
		return 0;
	}
}
int main()
{
	int N;
	std::cin >> N;
	for (int i = 0; i < N; i++) {
	    int a;
	    int b;
	    int c;
	    std::cin >> a >> b >> c;
	    if (f(a, b, c) == 1) {
		    std::cout << "YES" << std::endl;
	    } else {
		    std::cout << "NO" << std::endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n,a,b,c;
	cin>>n;
	for(int i=1; i<=n; i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c)
			cout<<"yes"<<endl;
		else if(a*a+b*b!=c*c)
		cout<<"no"<<endl;
		}
	}