Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

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

int main(){
    
    int a[3];
    int N;
    int i,j,k,tmp;
    
    cin>>N;
    for(k=0;k<N;k++){
        cin>>a[0]>>a[1]>>a[2];
        for(i=0;i<2;i++){
            for(j=i+1;j<3;j++){
                if(a[j]>a[i]){
                    tmp=a[i];
                    a[i]=a[j];
                    a[j]=tmp;
                }
            }
            
            
        }
        
        if(pow(a[0],2)==pow(a[1],2)+pow(a[2],2)){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    
    }

}

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

int n;
int edge[3];

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

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
	int N; cin >> N;
	while (N--) {
		int a, b, c; cin >> a >> b >> c;
		if (a > b)swap(a, b);
		if (b > c)swap(c, b);
		if (a + b > c)cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
struct length
{
	int a;
	int b;
	int c;
};
int main()
{
	int n,i;
	cin>>n;
	length *p=new length [n];
	for(i=0;i<n;i++)
		cin>>p[i].a>>p[i].b>>p[i].c;
	for(i=0;i<n;i++)
		if((p[i].a * p[i].a == p[i].b * p[i].b + p[i].c * p[i].c)||(p[i].a * p[i].a == p[i].b * p[i].b - p[i].c * p[i].c)||(p[i].a * p[i].a + p[i].b * p[i].b == p[i].c * p[i].c))
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	return 0;
}

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

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

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
    int n,a,b,c;
    cin>>n;
    for(int i=0;i<n;i++){
        bool t=false;
        cin>>a>>b>>c;
        if(a*a+b*b==c*c)
            t=true;
        if(a*a+c*c==b*b)
            t=true;
        if(b*b+c*c==a*a)
            t=true;
        if(t==true)
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}

C++: #include <stdio.h>
#include <stdbool.h>

bool judgeRectTriangle(int, int, int);

int main(void)
{
    int edge1, edge2, edge3;

    scanf("%d", &edge1);//最初のデータを捨てます。

    while (scanf("%d%d%d", &edge1, &edge2, &edge3) != EOF) {
        if (judgeRectTriangle(edge1, edge2, edge3)) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    
    return 0;
}

bool judgeRectTriangle(int x, int y, int z)
{
    if (x * x + y * y == z * z || y * y + z * z == x * x || z * z + x * x == y * y) {
        return true;
    } else {
        return false;
    }
}

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

int main() {

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

    cin >> a >> b >> c;

    bool flag = false;
    for ( int j = 0; j < 3; j++ ) {

      if ( a*a == b*b + c*c && a < b+c ) {
	flag = true;
	break;
      }

      k = a;
      a = b;
      b = c;
      c = k;

    }

    if ( flag ) {
      cout << "YES" << endl;
    }else {
      cout << "NO" << endl;
    }

  }

  return 0;

}

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

void sjx(double a, double b, double c)
{
	if (2*a < b + c+a && 2*b < a + c+b && 2*c < a + b+c)
		cout << "yes" << endl;
	else
		cout << "no" << endl;
}
int main()
{
	int a;
	double b,c,d,x;
	cin >> a;
	for (x = 1; x <= a; x++)
	{
		cin >> b >> c >> d;
		sjx(b, c, d);
	}
    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <queue>
#include <vector>

#define pb push_back

using namespace std;

typedef long long ll;

int main()
{
        int n;
        cin >> n;
        vector<int> a(3);
        int max;
        while(n--){
                for(int i=0; i<3; ++i) cin >> a[i];
                max = *max_element(a.begin(), a.end());
                if(max*max == a[0]*a[0] + a[1]*a[1] + a[2]*a[2] - max*max) cout << "YES" << endl;
                else cout << "NO" << endl;
        }

        return 0;
}

C++: #include <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <list>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <bitset>
#include <functional>

using namespace std;

#define FOR(i,n) 		for(int(i)=0;(i)<(int)(n);(i)++)
#define FORN(i,a,b,c) 	for(int(i)=a;i<(int)(b);i+=(c))
#define RES(x,nilai)	memset(x,nilai,sizeof(x));
#define pb              push_back
#define mp              make_pair
#define INF				1000000000

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

inline string IS(int a){
    char x[100];
    sprintf(x,"%d",a); string s = x;
    return s;
}

inline int SI(string a){
    char x[100]; int res;
    strcpy(x,a.c_str()); sscanf(x,"%d",&res);
    return res;
}

//==============================================

bool cmp(int x,int y) {return x>y;}

int arr[5],n;

int main() {
	//freopen("in.txt","r",stdin);
	//freopen("13.txt","w",stdout);
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	
	cin >> n;
	for(int i =0 ;i < n;i++) {
		cin >> arr[0] >> arr[1] >> arr[2];
		sort (arr,arr+3);
		if (sqrt((arr[0]*arr[0]) + (arr[1]*arr[1]) ) == arr[2]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
		
    return 0;
}

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

int sq(int x){return x*x;}
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    int a,b,c;
    cin>>a>>b>>c;
    cout<<(sq(max(a,max(b,c)))*2==sq(a)+sq(b)+sq(c) ? "YES" :"NO")<<endl;
  }
  return 0;
}

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

int main() {

    int sankaku[3];
    
    while (1) {
    cin >> sankaku[0] >> sankaku[1] >> sankaku[2];
    sort (sankaku, sankaku + 3);
    
    if (sankaku[2] == (sankaku[0] * sankaku[0]) + (sankaku[1] * sankaku[1])) {
        cout << "YES" << endl;
    }else {
        cout << "NO" << endl;
    }
    }
    

    return 0;
}

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

int right_triangle(int a,int b,int c)
{
	if (   a == sqrt(pow(b,2)+pow(c,2)) 
	    || b == sqrt(pow(c,2)+pow(a,2))
	    || c == sqrt(pow(a,2)+pow(b,2)))
	    return 1;
	else
		return 0;
}

int main()
{
	int a[3],n;
	cin >> n;
	for(int j=0;j<=n-1;j++){
		for(int i=0;i<=2;i++)
			cin >> a[i];
		switch (right_triangle(a[0],a[1],a[2]))
		{
		case 0:
			cout << "NO" << endl;
			break;
		case 1:
			cout << "YES" << endl;
			break;
		default:
			cout << "error" << endl;
			break;
		}
	}
	return 0;
}