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++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

#define debug(n) cout<<"# "<<#n<<": "<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main()
{
	int n;
	cin>>n;
	rep(i,n){
		int a,b,c;
		cin>>a>>b>>c;
		int d[]={a,b,c};
		sort(d,d+3);
		
		if(d[0]*d[0]+d[1]*d[1]==d[2]*d[2])
			puts("YES");
		else
			puts("NO");
	}
	
	return 0;
}

C++: #include<iostream>

using namespace std;

void judge(int x,int y,int z) {

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

C++: 		if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a){
#include <iostream>
using namespace std;
int main(){

	int a;
	int b;
	int c;

	int n;
	cin >> n;

	for(int i=1; i<=n; i++){

		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\n";

		}
		else {
			cout << "No" << endl;
		}
	}
}

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

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

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

int main(int argc, char **argv){
	int n = 0;

	std::cin >> n;

	for(int i = 0; i < n; i++){
		std::vector<int> v(3);

		std::cin >> v[0] >> v[1] >> v[2];
		std::sort(v.begin(), v.end());

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

C++: #define _USE_MATH_DEFINES
#include <cmath>

#include <iostream>
#include <string>

using namespace std;

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

C++: #include"bits/stdc++.h"
using namespace std;

int main()
{
    int n;
    cin >> n;
    int a[3];
    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 <vector>
#include <algorithm>
//#include <fstream>

using namespace std;

int main()
{
//	cut here before submit 
//	freopen ("testcase.tri", "r", stdin );
	int n;
	cin >> n;

	int i,j;
	vector <int> side (3, 0 );

	for (i = 0; i < n; ++i ){
		for (j = 0; j < 3; ++j ){
			cin >> side[j];
		} // end for

		sort (side.begin(), side.end() );

		if (side[2]*side[2] == side[1]*side[1] + side[0]*side[0] ){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		} // end if
	} // end for
		
	return 0;
}

C++: #include <cstdio>
int main()
{

        int i;
        scanf("%d",&i);

        int tri[10][3];

        int cnt,k;

        for(cnt=0;cnt<i;cnt++)
        {
                scanf("%d %d %d",&tri[cnt][0],&tri[cnt][1],&tri[cnt][2]);        
                for(k=0;k<3;k++)
                {
                        tri[cnt][k]=tri[cnt][k]*tri[cnt][k];
                }
                if(tri[cnt][0]==(tri[cnt][1]+tri[cnt][2])) printf("YES\n");
                if(tri[cnt][1]==(tri[cnt][2]+tri[cnt][0])) printf("YES\n");
                if(tri[cnt][2]==(tri[cnt][0]+tri[cnt][1])) printf("YES\n");
                else printf("NO\n");
        }

        return 0;
}

C++: main(a,b,c){
for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);
puts((a+b-c&&a+c-b&&b+c-a)?"NO:"YES"))
a*=a,b*=b,c*=c;
exit(0);
}

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

int main()
{
	int n;
	int side[3];

	cin >> n;

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

	return (0);
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a[3],n;
	cin>>n;
	for(int k=0;k<n;k++){
		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;
	   }
	return 0;
	}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(){
  using namespace std;
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    int a,b,c;
    cin >> a >> b >> c;
    int l,m,s;
    s = min(a,min(b,c));
    m = max(max(min(a,b),min(b,c)),min(c,a));
    l = max(a,max(b,c));
    if(l*l == m*m + s*s){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}

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

bool IsRightTriangle(const int a, const int b, const int c)
{
	if(a <= b){
		if(b <= c){
			if(c*c == a*a + b*b){
				return true;
			}else{
				return false;
			}
		}else{
			if(b*b == c*c + a*a){
				return true;
			}else{
				return false;
			}
		}
	}else{
		if(a <= c){
			if(c*c == a*a + b*b){
				return true;
			}else{
				return false;
			}
		}else{
			if(a*a == b*b + c*c){
				return true;
			}else{
				return false;
			}
		}
	}
}

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

C++: #include <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <random>
#include <cmath>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <map>
#include <deque>
#include <map>
#include <set>
#include <unordered_set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <bitset>
#include <sstream>
#include <new>
#include <typeinfo>
#include <iterator>


typedef long long ll;
typedef unsigned long long ull;
constexpr ll mop = 1000000007;
constexpr ll mop2 = 998244353;

using namespace std;

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