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 <deque>
#include <iostream>
#include <algorithm>

int main()
{
        using namespace std;
        deque<int> edge;
        int iedge[3];
        int j;
        int a,b,c;

        cin >> j;

        for(int l=0;l<j;l++){
                for(int i=0;i<3;i++){
                        cin >> iedge[i];
                edge.push_back(iedge[i]);
                }

                sort(edge.begin(),edge.end());
                a = edge[0];
                b = edge[1];
                c = edge[2];
                if(c*c == (a*a+b*b))cout << "YES\n";
                else cout << "NO\n";

        }

        return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<string>
#include<queue>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<fstream>
#include<sstream>
using namespace std;
vector<long>trn;
int main()
{
    long test,i,a,b,c;

      cin>>test;
     for(i=0;i<test;i++)
     {
         cin>>a>>b>>c;
         trn.push_back(a);
         trn.push_back(b);
         trn.push_back(c);
         sort(trn.begin(),trn.end());

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

          trn.clear();
     }



    return 0;
}

C++: # include <stdio.h>
int main (void)
{
	int ri,repeat;
	int a,b,c;
	scanf("%d",&repeat);
	for (ri=1;ri<=repeat;ri++){
		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");
		else printf("NO\n");
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int a,b,c,n,i;
int main(){
	cin>>n;
	for(i=0;i<n;i++){
	  cin>>a>>b>>c;
	  if(a>b){
		swap(a,b);
	  }
	  if(a>c){
	    swap(a,c);
	  }
	  if(b>c){
	    swap(b,c);
	  }
	  if(c*c==a*a+b*b){
		   cout<<"Yes"<<endl;
	  }
	  else{
		  cout<<"No"<<endl;
	  }
    }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
 
int main(void){
    int n;
    cin >> n;
    for(int i=0; i<n; i++){
        int a[3];
        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<sstream>
#include<cstdio>
#include<fstream>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdlib>
using namespace std;
bool power(int c,int a,int b){
	return pow(c,2)==(pow(a,2)+pow(b,2));
}
int main(){
	int n;
	scanf("%d",&n);
	stringstream buf;
	for(int x=0;x<n;++x){
		int i,j,k;
		scanf("%d %d %d",&i,&j,&k);
		if(power(i,j,k) || power(j,i,k) || power(k,i,j)){
			buf<<"YES\n";
		}else{
			buf<<"NO\n";
		}
	}
	cout<<buf.str();
	return 0;
}

C++: /* Is it a Right Triangle? */

#include <iostream>
using namespace std;

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

  for (int i = 0; i < n; i++) {
    int a, b, c;
    int result;
    cin >> a >> b >> c;
    if (a >= b && a >= c) result = a * a - (b * b + c * c);
    else if (b >= a && b >= c) result = b * b - (a * a + c * c);
    else result = c * c - (a * a + b * b);

    if (result == 0) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

  return 0;
}

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

C++: #include<iostream>
 
bool right_triangle(int a,int b,int c)
{
    if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
        return true;
    }else{
        return false;
    }   
}
 
int main()
{
    int x,y,z,N;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> x >> y >> z;
        if (right_triangle(x,y,z)) {
            std::cout << "Yes" << std::endl;
        }else{ 
            std::cout << "No" << std::endl;
        }
    }   
    return 0;
}

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

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

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

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

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

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

void judgement(unsigned int a, unsigned int b, unsigned int c) {
	if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

int main() {
	int n;//dataset

	cin >> n;

	vector<unsigned int> vector_a;
	vector<unsigned int> vector_b;
	vector<unsigned int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include <iostream>

using namespace std;

int main(void)
{
	int i;
	int a[3];

	for(i = 0; i < 3; i++){
		cin >> a[i];
	}
	a[0] = a[0]^2;
	a[1] = a[1]^2;
	a[2] = a[2]^2;

	if((a[0] == (a[1] + a[2])) || (a[1] == (a[0] + a[2])) || (a[2] == (a[0] + a[1]))){
		cout << "OK " << endl;
	}
	else{
		cout << "NG" << endl;
	}
	return 0;
	
}