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 <iostream>
using namespace std ;

int N ;
int x,y,z ;
int a,b,c ;

int main()
{
	cin >> N ;

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

		if( x == a )
		{
			y = max( b,c ) ;
			z = min( b,c ) ;
		}
		else if( x == b )
		{
			y = max( a,c ) ;
			z = min( a,c ) ;
		}
		else if( x == c )
		{
			y = max( a,b ) ;
			z = min( a,b ) ;
		}

		if( ((x*x) == ((y*y) + (z*z))) )
		{
			cout << "YES" << endl ;
		}
		else
		{
			cout << "NO" << endl ;
		}
	}
}

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;
		if(a*a+b*b==c*c&&a<c&&b<c&&(a<=b||b<=a)){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}	
}

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