Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

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

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

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
int n;cin>>n;
for(int i=0;i<n;++i){
int a[3]={};
for(int j=0;j<3;j++)cin>>a[j];
bool b=a[0]*a[0]+a[1]*a[1]==a[2]*a[2];
cout<<(b?"YES":"NO")<<endl;
}
}

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

C++: //????§???¢?????´?§?????§???¢???????????????????????°??????
#include <iostream>
using namespace std;
int main ()
{
int a,b,c,i,p;
cin >> p;
for (i = 0; i < p; i++){
cin >> a >> b >> c;
if (c*c == a*a + b*b || a*a == b*b + c*c || b*b == a*a + c*c){
cout << "YES" << endl;}
else
{cout << "NO" << endl;}
}
return 0;
}

C++: #include<iostream>
using namespace std;
int i,j,d,k,n1,n2,n3,temp;
 int l[3];

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
while(n1 < 1 or n1 > 1000 or n2 < 1 or n2 >1000 or n3 < 1 or n3 > 1000){
cin >> n1 >> n2 >> n3;
}
if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[0]=n1;
       l[1]=n2;
       l[2]=n3;
        for (i = 0; i < 2; i++) {
        for (j = 2; j > i; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[j];  
                l[j] = l[j - 1];
                l[j - 1] = temp;
            }
        }
    }
 }
    if(l[2]*l[2] == (l[1]*l[1]+l[0]*l[0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}



int main(){

   cin >> d;
   while(d <= 1 or d >= 1000){
       cin >> d;
   }

for(k=0;k<d;k++){
    rt();
}

    return 0;
}

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

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

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int l[3];
		cin >> l[0] >> l[1] >> l[2];
		sort(l,l+3);
		
		if(l[2]l[2]=l[1]*l[1]+l[0]*l[0])
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
      return 0;
}

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

using namespace std;

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

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int long long i=0;i<n;i++)
using namespace std;
char t[7];
int main(){
    int n;
    cin>>n;
    while(n>0){
    vector<int> v(3);
    rep(i,3){
        int x;
        cin>>x;
        v.push_back(x);
    }
    sort(v.begin(),v.end(),greater<int>());
    if(v[0]==sqrt(v[1]*v[1]+v[2]*v[2])){
        cout<<"YES";
    }else{
        cout<<"NO";
    }
        if(n!=0){
            cout<<endl;
        }
        n--;
    }
    
    return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	int deta[3];
	int square;

	cin >> n;
	
	for (int i = 0; i < n; i++){
		for (int j = 0; j < n; j++){
			cin >> deta[j];
		}
		square = (deta[0] * deta[0]) + (deta[1] * deta[1]);

		if (square == deta[2] * deta[2]){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

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

int main()
{
	priority_queue<int> que;
	int n;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		for (int j = 0; j < 3; j++)
		{
			cin >> a;
			que.push(a);
		}
		a = que.top();
		que.pop();
		b = que.top();
		que.pop();
		c = que.top();
		que.pop();
		if (a - b < c)
			cout << "YES";
		else
			cout << "NO";
	}
	return 0;
}

C++: #include <stdio.h>


int main()
{
    int n,a,b,c,sum=0,i;
    while(scanf("%d",&n)==1)
    for(i=0;i<n;i++)
    {
        scanf("%d%d%d",&a,&b,&c);
        sum=sqrt((a*a)+(b*b));
        if(c==sum)
        {
            printf("YES\n");
        }
        else
        printf("NO\n");
    }

    return 0;
}

C++: #include<iostream>
#include<algorithm>
int ride2(int n){return n*n;}
using namespace std;
int main(){
    int a[3],n;
    cin>>n;
    while(n--){
        for(int i=0;i<3;i++)cin>>a[i];
        sort(a,a+3);
        if(ride2(a[0])+ride2(a[1])==ride2(a[2]))
            cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }

    return 0;
}

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

using namespace std;

int main(){
	int n;
	cin >> n;
	while(--n){
		int a, b, c, sum;
		cin >> a >> b >> c;
		int x, y ,z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

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

#define N 1000

struct{int a[3];} d[N];

int main(){
    int i,j,L;
    int longest,small;
    scanf("%d",&j);
    for(i=0; i<j&&i<N; scanf("%d %d %d",&d[i].a[0],&d[i].a[1],&d[i].a[2]),i++);
    L=i;
    for(i=0;i<L;i++){        
        longest=0;
        for(j=0;j<3;j++)
            if(longest<d[i].a[j])
                longest=d[i].a[j];
        for(j=0;j<3;j++)
            if(d[i].a[j]!=longest)
                small+=pow(d[i].a[j],2);
        if(small==pow(longest,2))
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}