Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	nQueries := nextInt()
	for i := 0; i < nQueries; i++ {
		lengths := []int{nextInt(), nextInt(), nextInt()}
		sort.Slice(lengths, func(i, j int) bool { return lengths[i] > lengths[j] })
		if math.Pow(float64(lengths[0]), 2) == math.Pow(float64(lengths[1]), 2)+math.Pow(float64(lengths[2]), 2) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

C++: #include<iostream>
void swap(int *x,int *y){
	int z=*x;
	*x=*y,*y=z;
}
int main(){
	using namespace std;
	int n,a,b,c;
	cin>>n;
	while(n--){
		cin>>a>>b>>c;
		if(b<c)swap(b,c);
		if(a<b)swap(a,b);
		if(b<c)swap(b,c);
		if((a*a)==(b*b)+(c*c))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	
	return 0;
}

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

bool check(int a, int b , int c){
	return ( a*a == ( b*b + c*c ) )? true : false ;
}

int main(){
	int n, a, b, c;

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

	return 0;
}

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

int main(){
	int N;
	int l1, l2, l3;
	int answer=0;
	vector<int> lines;
	cin >> N;
	for(int i=0;i<N;i++){
		cin >> l1 >> l2 >> l3;
		lines.push_back(l1);
		lines.push_back(l2);
		lines.push_back(l3);
		while(next_permutation(lines.begin(), lines.end())){
			if(pow(lines[0],2) == pow(lines[1],2) + pow(lines[2],2)) answer = 1;
		}
		if (answer == 1) cout << "YES" << endl;
		else cout << "NO" << endl;
		lines.clear();
		answer = 0;
	}
	return 0;
}

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

using namespace std;

int main()
{
    int n;
    int a;
    int b;
    int c;
    n = n+1;
    while (n--)
    {
        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) )
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {
	int kaisu;
	int x,y,z;
	int kekka;
	
	cin >> kaisu;
	
	for(int i = 1; i <= kaisu; i++){
	cin >> x >> y >> z;
	int array[3];
	array[0] = x;
	array[1] = y;
	array[2] = z;
		if( array[0] < array[1] ){
		swap(array[0],array[1]);
		}
		if( array[0] < array[2] ){
		swap(array[0],array[2]);
		}
		if( array[1] < array[2] ){
		swap(array[1],array[2]);
		}
	kekka = ((array[1]*array[1]+array[2]*array[2])-array[0]*array[0])/2*array[1]*array[2];
	if (kekka == 0){
	cout << "YES";
	}
	else {
	cout << "NO";
	}
	}

	
    return 0;
}

C++: #include <iostream>

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

	for( int i=0; i<N; ++i ) {
		int a=0, b=0, c=0;
		std::cin >> a >> b >> c;
		std::cout << (( a*a + b*b == c*c )?"YES":(( b*b + c*c == a*a )?"YES":(( c*c + a*a == b*b )?"YES":"NO"))) << std::endl; 
	}
}

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

int main(){
  int a,b,c;
  while(scanf("%d %d %d",&a,&b,&c)){
  a*=a;
  b*=b;
  c*=c;
  if(a==(b+c)||b==(a+c)||c==(a+b))cout << "YES" <<endl;
  else cout << "NO" <<endl;
  }
  return 0;

C++: #include <iostream>
  
inline bool isRightTriangle(const u_int a, const u_int b, const u_int c){
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}
  
int main(){
    u_int n;
    std::cin >> n;
     
    for (u_int i = 0; i < n; ++i){
        u_int a, b, c;
        std::cin >> a >> b >> c;
        std::cout << (isRightTriangle(a, b, c) ? "YES" : "NO") << std::endl;
    }
  
    return 0;
}

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

int l[3][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

for(int j = 0; j < buf; j++){
	if(l[j][2]*l[j][2] == l[j][0]*l[j][0] +l[j][1]*l[j][1]){
		cout << "YES";
	}else{
		cout << "NO";
	}

	if(j != buf-1) cout << endl;
}

return 0;
}

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

C++: #include <cstdio>

int i,a,b,c;
int main()
{
	scanf("%d",&i);
		while(i!=0)
		{
			scanf("%d %d %d",&a,&b,&c);
			
			if(a*a+b*b==c*c||b*b+c*c==a*a||c*c+a*a==b*b)
			{
				printf("YES\n");
			}
			else printf("NO\n");
			i--;
		}

	return 0;
}

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

int main(){
	int N;
	int l1, l2, l3;
	int answer=0;
  vector<int> lines;
	vector<string> result;
	cin >> N;
	for(int i=0;i<N;i++){
		cin >> l1 >> l2 >> l3;
		lines.push_back(l1);
		lines.push_back(l2);
		lines.push_back(l3);
		while(next_permutation(lines.begin(), lines.end())){
			if(pow(lines[0],2) == pow(lines[1],2) + pow(lines[2],2)) answer = 1;
		}
		if (answer == 1) result.push_back("YES");
		else result.push_back("NO");
    lines.clear();
    answer = 0;
	}

  for(int i=0;i<result.size();i++){
    cout << result[i] << endl;
  }
	return 0;
}

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

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

int main(void)
{
    int n, a[3];
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        bool flag = false;
        scanf("%d %d %d", &a[0], &a[1], &a[2]);
        for (int j = 0; j < 3; ++j) {
            if (a[j] * a[j] == (a[(j + 1) % 3] * a[(j + 1) % 3] + a[(j + 2) % 3] * a[(j + 2) % 3])) {
                flag = true;
            }
        }
        if (flag) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

C++: #include <stdio.h>

int tests, a, b, c;

int main(void)
{
  scanf("%d",&tests);
  while(tests--)
  {
    scanf("%d %d %d",&a,&b,&c);
    if (a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}

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

C++: #include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int a,b,c,n,i;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a>>b>>c;
        if(a*a==b*b+c*c || b*b==a*a+c*c || c*c==b*b+a*a)
            cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
        
    }
        
    return 0;
}

C++: #include <string>
#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((c*c)==(a*a)+(b*b)){
   cout << "YES" << endl;}
   else {
   cout << "NO" << endl;}
   
    }
   
    return 0;
}