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

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

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

	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>

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

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

C++: #include<iostream>
using namespace std;
int main() {
	int x[3][1000];
	int z[1000];
	int a,b,c;
	cin >> b;
	for(a=0;a<b;a++) {
		for(c=0;c<3;c++) {
			cin >> x[c][a];
		}
	}
	for(a=0;a<b;a++){
		if(x[1][a]/3 == x[2][a]/4 && x[2][a]/4 == x[3][a]/5 || x[2][a]/5 == x[3][a]/4){
			cout << "YES" << endl;
		}
		else if(x[1][a]/4 == x[2][a]/3 && x[2][a]/3 == x[3][a]/5 || x[2][a]/5 == x[3][a]/3){
			cout << "YES" << endl;
		}
		else if(x[1][a]/5 == x[2][a]/3 && x[2][a]/3 == x[3][a]/4 || x[2][a]/4 == x[3][a]/3){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

void reOrder(int &a,int &b,int &c)
{
	int b1,b2,b3;
	b1 = a > b?(a > c? a:c):( b>c?b:c);
	b3 = a < b? (a < c? a:c):(b < c?b:c);
	b2 = a+b+c - b1 - b3;
	//
	a = b2;
	b = b3;
	c = b1;
}
int main(){

	int g,a,b,c;

	cin>>g;
	for(int i = 0; i < g; i ++)
	{
		cin>>a>>b>>c;
		{
			reOrder(a,b,c);
			if(a*a + b*b == c*c)
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}

	}

	
    return 0;
}