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++: public class HelloWorld {
    public static void main (String[] args) {

	int n;
	int a,b,c;
	int a[3];
	string str[];
	
	n = Integer.parseInt(br.readLine());
	str[]=new str[n];
	for(int i=0;i<n;i++){

	a = Integer.parseInt(br.readLine());
	b = Integer.parseInt(br.readLine());
	c = Integer.parseInt(br.readLine());

	a[0]=max(a,b,c);
	if(a[0]==a){
		a[1]=b;
		a[2]=c;
	}elseif(a[0]==b){
		a[1]=a;
		a[2]=c;
	}elseif(a[0]==c){
		a[1]=b;
		a[2]=a;
	}
	if(a[0]^2==a[1]^2+a[2]^2){
		str[i]="YES";
	}else{
		str[i]="NO";
	}
	}

	for(int i=0;i<n;i++){
				System.out.println(str[i]);
	}
    }
}

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

int main(void)
{
	const int Size = 1000;
	int size;
	int a,b,c,get_bool[Size]={0};
	
	cin >> size;
	for(int i=1;i<=size;i++)
	{
		cin >> a >> b >> c;
		if(a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
			get_bool[i]++;
		else 
			get_bool[i]=0;
	}
	
	for(int i=1;i<=size;i++)
	{
		if(get_bool[i]!=0)
			cout << "YES\n";
		else 
			cout << "NO\n";
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
  int n;
  while(cin >> n) {
    vector<string> ans;
    for (int i = 0; i < n; ++i) {
      int x, y, z;
      cin >> x >> y >> z;
        if (x * x == y * y + z * z || y * y == z * z + x * x || z * z == x * x + y * y) {
          ans.push_back("YES");
      } else {
        ans.push_back("NO");
      }
    }
    for (int i = 0; i < n; ++i) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;

int main() {
	int a[3];
	int n;
	cin >> n;
	while (n--) {
		rep(i, 3)cin >> a[i];
		sort(a, a + 3);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}
	return 0;
}

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

int main() {
  int x;
  int a[1000],b[1000],c[1000];

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

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<int> LArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

int itiv;
inline int getInt() { return (cin >> itiv, itiv); }
void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }
inline bool between(int first, int last, int n) { return first <= n && n <= last; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

int m, n;
int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
int dr[] = { 0, -1, 0, 1 }, dc[] = { -1, 0, 1, 0 };


int main(void)
{
	while(cin >> n && n)
	{
		for (int i = 0; i < n; i++)
		{
			//Array arr(3);
			//readAll(arr, n);
			cout << "YES" << endl;
			//sort(ALL(arr));
			//cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
	}
	return 0;
}

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

int main(){
    int a,b,c,d,i;
    cin >> d;
    for(i=0;i<d;i++){
        if(cin >> a >> b >> c &&(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++: #include<iostream>
#include<algorithm>

int length[3], length_max, n;

int main(void)
{
	std::cin >> n;

	while(n){
		std::cin >> length[0] >> length[1] >> length[2];

		length_max = *( std::max_element( length, length + sizeof( length ) / sizeof( length[0] )));

		std::cout << ( length_max * length_max == length[0] * length[0] + length[1] * length[1] + length[2] * length[2] - length_max * length_max ? "YES" : "NO" ) << std::endl;

		n--;
	}
	
	return 0;
}

C++: #include <stdio.h>
int main()
{
  int a,b,c,sum,i,n;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d",&a,&b,&c);
    a=a*a;
    b=b*b;
    c=c*c;
    sum=a+b+c;
    if(a==1&&b==1&&c==1){
      printf("NO\n");
    }else if(sum/2==a||sum/2==b||sum/2==c)printf("YES\n");
    else printf("NO\n");
  }

  return 0;
}

C++: #include <cstdio>

using namespace std ;

int main() {

    int tes,s1,s2,s3,h,a,b;
    scanf("%d",&tes);
    while(tes-- > 0) {
        scanf("%d %d %d",&s1,&s2,&s3);
        if(s1 > s2) {
            h = s1 ;
            a = s2 ;
        }
        else {
            h = s2 ;
            a = s1 ;
        }
        if(h < s3) {
            b = h ;
            h = s3 ;
        }
        else {
            b = s3 ;
        }
        if(a*a + b*b == h*h) {
            puts("YES");
        }
        else {
            puts("NO");
        }
    }

}

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

int main(){
	vector<vector<int> > a;

	int lines = 0;
	scanf("%d", &lines);

	bool isOk[lines];
	for (int i = 0; i < lines; ++i)
	{
		int l[3];
		for (int j = 0; j < 3; ++j)
			scanf("%d", &l[j]);

		if(pow(l[0], 2.0) + pow(l[1], 2.0) == pow(l[2], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[1], 2.0) + pow(l[2], 2.0) == pow(l[0], 2.0)) isOk[i] = true;
		if(!isOk[i] && pow(l[2], 2.0) + pow(l[0], 2.0) == pow(l[1], 2.0)) isOk[i] = true;
	}

	for (int i = 0; i < lines; ++i)
	{
		if(isOk[i]) printf("YES\n");
		else printf("NO\n");
	}
}

C++: #include<stdio.h>

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

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

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>

void swap(int *a, int *b)
{
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main()
{
	const int BUFF_SIZE = 100;
	char buff[BUFF_SIZE];
	
	fgets(buff, BUFF_SIZE, stdin);
	int count = atoi(buff);
	
	for (int i = 0; i < count; i++)
	{
		fgets(buff, BUFF_SIZE, stdin);
		int a, b, c;
		sscanf(buff, "%d %d %d", &a, &b, &c);
		
		if (c > b)
		{
			swap(&b, &c);
		}
		if (b > a)
		{
			swap(&a, &b);
		}
		
		int flag = ((a * a) == (b * b + c * c));
		
		printf("%s\n", flag ? "YES" : "NO");
	}
	
	return 0;
}