Go: package main

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

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)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}
func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

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

using namespace std;

int main() {
    int n; scanf("%d", &n);
    
    for(int i = 0; i < n; ++i) {
    	int s[3]; scanf("%d %d %d", &s[0], &s[1], &s[2]);
    	
    	sort(s, s + 3);
    	
    	int a=s[0], b=s[1], c=s[2];
    	
    	if (c*c == (a+b)*(a+b)) puts("YES");
    	else puts("NO");
    }
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<math.h>
#define L(_i,_N) for(int _i=0;_i<_N;_i++)
typedef long long int lli;
using namespace std;

int main() {
	int N,Line[3];
	cin >> N;
	L(i, N) {
		L(j, 3) cin >> Line[j];
		sort(Line, Line + 3);
		if (pow(Line[0], 2) + pow(Line[1], 2) == pow(Line[2], 2)) cout << "Yes" << endl;
		else cout << "No" << endl;
	}
	return 0;
}

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


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

C++: #include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;

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

        a *= a;
        b *= b;
        c *= c;

        if (a == b + c || b == a + c || c == a + b) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

int main()
{
int T;
scanf("%d",&T);
for(int t=0;t<T;t++){
int edge[3];
printf("%d %d %d",edge,edge+1,edge+2);
sort(edge,edge+3,greater<int>());
if(edge[0]*edge[0]==edge[1]*edge[1]+edge[2]*edge[2]){
printf("%s\n","YES");
}else{
printf("%s\n","NO");
}
}

return 0;
}

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;
}