Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

C++: using namespace std;

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

	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <cstring>
#include <utility>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#define debug(x) cerr << #x << ':' << x << endl
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define ALL(c) (c).begin(), (c).end()
using namespace std;
typedef long long ll;

int main(){
    int n;
    cin >> n;
    int a,b,c;

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

C++: #include<cstdio>
int main(void){
int a,b,c,n;
scanf("%d",&n);
while(n--!=0){
 scanf("%d%d%d",&a,&b,&c);
 puts(a*a==b*b+c*c || b*b==a*a+c*c || c*c==a*a+b*b?"YES":"NO");
}
return 0;
}

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

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


    }
    return 0;
}

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


int main(){

  int n;
  cin >> n;

  vector <int> array(n*n*n,0);

  for(int i = 0; i < n;i++){
    for(int j = 0;j < 3;j++){
      cin >> array[j];
    }
    sort(array.begin(),array.end());

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


  return 0;
}

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

int ary[1010][3];
int main(){
	priority_queue<int> que;
	int N;
	cin>>N;
	int a;
	for(int i=1;i<=N;i++){
		for(int j=0;j<=2;j++){
			cin>>a;
			que.push(a);
		}
		for(int j=0;j<=2;j++){
			ary[i][j]=que.top();
			que.pop();
		}
	}
	for(int i=1;i<=N;i++){
		if(ary[i][0]*ary[i][0]==ary[i][1]*ary[i][1]+ary[i][2]*ary[i][2]){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
	}
	return 0;
}

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

int main()
{
	int n, a[3];
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < 3; j++)cin >> a[j];
		sort(a, a + 3);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;
    char* Result[NMAX];

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        
        if( (( (a^2) + (b^2) ) == (c^2)) || (( (b^2) + (c^2) ) == (a^2)) || (( (c^2) + (b^2) ) == (a^2))){
            Result[Ncount] = "Yes";
        }else{
            Result[Ncount] = "NO";
        }
    }
    
    //??????????????????????????¨???Yes or No?????????
    for(int Ncount=0;Ncount < N;Ncount++){
        printf("%s\n",Result[Ncount]);
    }
    
}

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

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

C++: #define _CRT_SECURE_NO_WARNINGS
#include<algorithm>
#include<cstdio>

int main(){
	int n, a[3];
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		for(int j = 0; j != 3; ++j )
			scanf("%d", a+j);
		std::sort(a, a + 3);
		puts(a[2] * a[2] == a[0] * a[0] + a[1] * a[1] ? "YES" : "NO");
	}
	return 0;
}

C++: #include <iostream>

int main()
{
        int a[3], n, t;
        std::cin >> n;
        for(int i = 0; i < n; ++i)
        {
                std::cin >> a[0] >> a[1] >> a[2];
                int max_index=0;
                for(int j = 1; j < 3; ++j)
                        if(a[max_index] < a[j])
                                max_index = j;
                t = 0;
                for(int j = 0; j < 3; ++j)
                        if(j != max_index)
                                t += a[j]*a[j];
                if(t == (a[max_index]*a[max_index]))
                        std::cout << "YES" << std::endl;
                else
                        std::cout << "NO" << std::endl;
        }
        return 0;
}

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

using namespace std;

int main(){
	int n;
	int a,b,c;
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> a >> b >> c;
		vector<int> v;
		v.push_back(a);
		v.push_back(b);
		v.push_back(c);
		sort(v.begin(),v.end());
		if(v[2]*v[2]==v[1]*v[1] + v[0]*v[0]){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;
    char* Result[NMAX];

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        
        if( (( (a^2) + (b^2) ) == (c^2)) || (( (b^2) + (c^2) ) == (a^2)) || (( (c^2) + (a^2) ) == (b^2))){
            Result[Ncount] = "YES";
        }else{
            Result[Ncount] = "NO";
        }
    }
    
    //??????????????????????????¨???Yes or No?????????
    for(int Ncount=0;Ncount < N;Ncount++){
        printf("%s\n",Result[Ncount]);
    }
    
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
int main() {
	std::vector<int> on ,tw ,th;
	int n;
	std::cin >> n;
	for (int i = 0; i < n; i++) {
		int a, b, c;
		std::cin >> a >> b >> c;
		on.emplace_back(a);
		tw.emplace_back(b);
		th.emplace_back(c);
	}
	for (int i = 0; i < n; i++) {
		int x[3];
		x[0] = on[i];
		x[1] = tw[i];
		x[2] = th[i];
		std::sort(x, x + 3);
		if (x[0]* x[0] + x[1] * x[1] == x[2] * x[2]) {
			std::cout << "Yes" << std::endl;
		}
		else {
			std::cout << "No" << std::endl;
		}
	}
}

C++: #include <cstdio>
#include <cstdlib>

using namespace std;

int main()
{
    int n;

    int a;
    int b;
    int c;
    scanf("%d", &n);
    while(n--)
    {
        scanf("%d %d %d", &a, &b, &c);
        if (    (a*a+b*b == c*c) || (b*b+c*c == a*a) || (c*c+a*a == b*b)    )
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}