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 <iostream>
#include <sstream>

int main()
{
        unsigned int count=0;
        std::cin>>count;
        std::string* res;
        res=new std::string [count+1];
        for(unsigned int i=0;i<=count;i++)
        {
                std::string str;
                getline(std::cin,str);
                unsigned int a,b,c;
                std::stringstream s(str);
                s>>a>>b>>c;
                if((a*a==b*b+c*c)||(b*b==a*a+c*c)||(c*c==a*a+b*b))
                        res[i]="YES";
                else
                        res[i]="NO";
        }
        for(unsigned int i=1;i<=count;i++)
                std::cout<<res[i]<<std::endl;
        return 0;
}

C++: #include <iostream>

auto main () -> int
{
    const char * res [] = {"NO" , "YES"};
    int n;
    std::cin >> n;

    for (auto i = 0; i < n; ++ i)
    {
        int a , b , c;
        std::cin >> a >> b >> c;
        if (a > c)
        {
            std::swap (a , c);
        }
        if (b > c)
        {
            std::swap (b , c);
        }
        std::cout << res [a * a + b * b == c * c] << std::endl;
    }
}

C++: #include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <stack>
#include <set>
#include <list>
#include <vector>
#include <algorithm>
#include <cassert>
#include <iterator>
#include <sstream>
#include <complex>
#include <bitset>
#include <iomanip>
#include <cctype>
#include <limits>
#include <numeric>
#include <cmath>
#include <functional>
#include <queue>
#include <cstring>

using namespace std;

typedef unsigned int uint;
typedef unsigned long long ull;

#define FORE(k,a,b) for(int k=(a); k <= (int)(b); ++k)
#define FOR(k,a,b) for(int k=(a); k < (int) (b); ++k)

#define pb push_back
#define mp make_pair
#define sfi(a) scanf("%d",&a)
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<uint> uvi;
typedef vector<uvi> uvvi;
typedef vector<vd> vvd;
typedef pair<int,int> ii;
typedef vector<pair<int,int> > vii;
typedef vector<vii> vvii;
typedef pair<uint,uint> uu;
typedef map<string, int> msi;
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define FOR_IT(c,i) for(typeof((c).begin() i = (c).begin(); i != (c).end(); i++)
#define contains(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())

int main(){

    int str[5],test;

    sfi(test);
    while(test--){

            scanf("%d%d%d",&str[0],&str[1],&str[2]);


        sort(str,str+3);

        if(str[2]*str[2]==(str[0]*str[0])+(str[1]*str[1]))
            puts("YES");
        else
            puts("NO");
    }




return 0;
}

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

using namespace std;

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

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N;

int main(){
    cin>>N;
    int a[N][3];
    rep(i,N){
        rep(j,3){
            cin>>a[i][j];
        }
    }
    rep(i,N){
        sort(a[i],a[i]+3);
        if(pow(a[i][0],2)+pow(a[i][1],2)==pow(a[i][2],2)){
            out("Yes");
        }
        else{
            out("No");
        }
    }
}

C++: #include <cstdlib>
#include <vector>
#include <math.h>
#include <iostream>
using namespace std;

int main(){
	vector<vector<int> > a;

	int lines = 0;
	scanf("%d", &lines);

	bool isOk[lines];
	for (int i = 0; i < lines; ++i)
	{
		int l[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", &l[j]);

		double hen[3] = {pow(l[0], 2), pow(l[1], 2) ,pow(l[2], 2)};
		if(hen[0]+hen[1] == hen[2]) isOk[i] = true;
		else if(hen[1]+hen[2] == hen[0]) isOk[i] = true;
		else if(hen[2]+hen[0] == hen[1]) isOk[i] = true;
	}

	for (int i = 0; i < lines; ++i)
	{
		if(isOk[i]) printf("YES\n");
		else printf("NO\n");
	}
}

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

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

	}
	 return 0;
	}

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

int is_right_triangle(int min, int mid, int max) {
  return max * max == min * min + mid * mid;
}

int main() {
  int ntriangle;
  std::cin >> ntriangle;

  for (auto i = 0; i < ntriangle; i++) {
    std::vector<int> tri;
    for (auto j = 0; j < 3; j++) {
      int len;
      std::cin >> len;
      tri.push_back(len);
    }
    std::sort(tri.begin(), tri.end());
    if (is_right_triangle(tri[0], tri[1], tri[2])) {
      std::cout << "YES\n";
    } else {
      std::cout << "NO\n";
    }
  }
  return 0;
}

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

signed main(){
        int n;
        scanf("%d", &n);
        for(int i=0;i<n;i++){
                int a,b,c;
                scanf("%d %d %d",&a,&b,&c);
                int t=std::max({a,b,c});
                if(a*a+b*b+c*c-t*t-t*t==0) printf("YES\n");
                else printf("NO\n");
        }
        return 0;
}

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    for(int l=0;l<n;l++){
        for(a=0;a<3;a++){
        cin>>i[a];
            if(i[a]<=0){
                break;
            }
            f[a]=i[a]^2;
        }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
}

C++: #include <bits/stdc++.h>
#define LL long long
#define ULL unsigned long long
#define rep(i, n) for (int i=0; i<(n); i++)
#define rep2(i, x, n) for (int i=x; i<(n); i++)
using namespace std;
int main(){
     
    cin.tie(0);
    ios::sync_with_stdio(false);
     
    int n;
    cin >> n;
     
    rep(i,n){
         
        int a, b, c;
        cin >> a >> b >> c;
         
        if(a>b&&a>c){
            cout << ( (a == b) == c ? "NO" : b*b + c*c == a*a ? "YES" : "NO" ) << endl;
        }else if(b>a&&b>c){
            cout << ( (a == b) == c ? "NO" : a*a + c*c == b*b ? "YES" : "NO" ) << endl;
        }else{
            cout << ( (a == b) == c ? "NO" : a*a + b*b == c*c ? "YES" : "NO" ) << endl;
        }
    }
    return 0;
}