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>
#include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;

bool isRightTriangle(int a, int b, int c) {
    return(a*a + b*b == c*c);
}

int main(void) {
    int num; cin >> num;
    vector<int> vec(num);
    for(int r = 0; r < num; r++) {
        cin >> vec[0] >> vec[1] >> vec[2];
        sort(vec.begin(), vec.end());
        cout << (isRightTriangle(vec[0], vec[1], vec[2]) ? "YES" : "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,b,c; cin >> a >> b >> c;
		if(a*a+b*b == c*c)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	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;
		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>
int main(void){
	int n,a,b,c,d;
	std::cin>>n;
	while(n--){
		std::cin>>a>>b>>c;
		d=a>b?a:b;
		d=c>d?c:d;
		std::cout<<(a*a+b*b+c*c==2*d*d?"YES\n":"NO\n");
	}
}

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

int main(void){
	int x[3];
	int d,i = 0;
	cin >> d;
	string n = "NO", y = "YES";
	while(i < d){
		sort(x,x + 3);
		if(x[2] <= x[1] + x[0])
			cout << y << endl;
		else
			cout << n << endl;
		d++;
	}
	return 0;
}

C++: #include <iostream>
 
using namespace std;
 
int main(){
  int num,tmp;
 
  cin >> num >> endl;

  int a[num][3];


  for(int i=0; i<num; ++i)
    cin >> a[i][0] >> a[i][1] >> a[i][2] >> endl;


  for(int i=0; i<num; ++i){
    
    for(int j=0; j<3; ++j){
      for(int k=j+1; k<3; ++k){
	if(a[i][j] < a[i][k]){
	  tmp = a[i][j];
	  a[i][j] = a[i][k];
	  a[i][k] = tmp;
	}
      }
    }
    
    if(a[i][0]*a[i][0] == a[i][1]*a[i][1] + a[i][2]*a[i][2]){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }  

}

C++: #include <stdio.h>

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n;
    int a,b,c;

    cin >> n;

    for(int i=0; i<3; ++i){
        cin >> a >> b >> c;
        if(a < b){
            swap(a,b);
        }
        if(a < c){
            swap(a,c);
        }

        if((a*a) == (b*b + c*c)){
            cout << "YES" << endl;
        }
        else{
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

bool checkRightTriangle(int side1, int side2, int side3) {
  std::vector<int> edges;
  edges.push_back(side1);
  edges.push_back(side2);
  edges.push_back(side3);
  std::sort(edges.begin(), edges.end(), std::greater<int>());
  if (pow(edges[0], 2) == pow(edges[1], 2) + pow(edges[2], 2)) {
    return true;
  } else {
    return false;
  }
}

int main(int argc, char const *argv[]) {
  int data_num;
  std::cin >> data_num;

  int a, b, c;
  std::vector<bool> results;

  for (size_t i = 0; i < data_num; i++) {
    std::cin >> a >> b >> c;
    results.push_back(checkRightTriangle(a, b, c));
  }

  for (bool result : results) {
    if (result) {
      std::cout << "YES" << '\n';
    } else {
      std::cout << "NO" << '\n';
    }
  }
  return 0;
}

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

int main()
{
	int n;
	cin >> n;

	for(int i=0;i<n;++i){
		double a,b,c;
		cin >> a >> b >> c;
		double _a = pow(a,2),_b = pow(b,2),_c = pow(c,2);

		if(_a == _b + _c || _b == _a + _c || _c == _a + _b)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

bool CheckRightTriangle(int a,int b,int c);
int main(){
	int *a,*b,*c,datanum;
	cin>>datanum;
	a = new int[datanum];
	b = new int[datanum];
	c = new int[datanum];
	for( int i=0;i<datanum;i++ ){
		cin>>a[i]>>b[i]>>c[i];
	}
	for(int i=0;i<datanum;i++){
		if(CheckRightTriangle(a[i],b[i],c[i])){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	delete[] a;
	delete[] b;
	delete[] c;
	return 0;
}

bool CheckRightTriangle(int a,int b,int c){
	if( a*a+b*b==c*c ) return true;
	if( c*c+a*a==b*b ) return true;
	if( b*b+c*c==a*a ) return true;
	return false;
}

C++: #include <iostream>

void printN (int N);
int main()
{
    int N;
    std::cin >> N;
    printN (N);
    }

void printN (int N)
{
    int x, y, z;
    for (int i = 0; i < N; ++i) {
        std::cin >> x >> y >> z;
        if (x * x + y * y == z * z) {
        std::cout << "yes" << std::endl;
        } else if (y * y + z * z == x * x) {
        std::cout << "yes" << std::endl;
        } else if (z * z + x * x == y * y) {
        std::cout << "yes" << std::endl;
        } else {
        std::cout << "no" << std::endl;
        }
    }
}

C++: #include <iostream>

using namespace std;
bool TestPythagoras(int a,int b,int c)
{
   if(a*a==b*b+c*c)
    return true;
   else return false;
}

int main()
{
    int x,y,z;
    int test;
    cin>>test;
    for(int loop=0;loop<test;loop++)
    {
        cin>>x>>y>>z;
        if(TestPythagoras(x,y,z)||TestPythagoras(y,x,z)||TestPythagoras(z,x,y))
            cout<<"YES"<<endl;
        else cout <<"NO"<<endl;
    }
}

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

int main()
{
	int l;
	cin >> l;
	for (int i = 0; i < l; i++) {
		int a, b, c;
		while (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<iostream>
using namespace std;
int main(void){
    int a,b,c,n;
    cin>>n;
    for(int i=0;i<n;i++){
        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))))
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    return 0;
}

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

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

  cin >> n;

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

  return 0;
}

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

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

}