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>
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 d = max(max(a,b),c);
		int e = min(min(a,b),c);
		int f = a+b+c-d-e;
		if(d*d==e*e+f*f) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

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

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

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

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

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

C++: #include <iostream>
using namespace std;
 
 
int main()
{
      int a,b,c,n,index;
 
      index = 0; 
      cin >> n; 
      while(1)
      {
           cin >> a >> b >> c;       
           if( a*a + b*b == c*c)     
                   cout >> "Yes" >> endl;
           else
                   cout >> "No" >> endl;
      
          if(index == n)
                   break;     
 
          index++;
     }
 
     return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)

int main(){
	int n,a,b,c;
	scanf("%d",&n);
	rep(i,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 ){
			puts("YES");
		}else{
			puts("NO");
		}
	}
	return 0;
}

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

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

C++: #include<stdio.h>
int main(void)
{
	int a,b,c1,c2,c3,i;
	scanf("%d",&a);
	for(i=0;i<a;i++){
		scanf("%d %d %d",&c1,&c2,&c3);
	}
	if(c1*c1+c2*c2==c3*c3){
		printf("YES\n");
	}
	else if(c1*c1+c3*c3==c2*c2){
		printf("YES\n");
	}
	else if(c2*c2+c3*c3==c1*c1){
		printf("YES\n");
	}
	else{
		printf("NO\n");
	}
	return 0;
}

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

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

using namespace std;

int aa(int x, int y, int z) {

	return ((pow(x, 2) + pow(y, 2) == pow(z, 2)) || (pow(x, 2) + pow(z, 2) == pow(y, 2)) || (pow(y, 2) + pow(z, 2) == pow(x, 2)));
}

int main() {

	int a, b[1000], c[1000], d[1000];
	bool e[1000];

	cin >> a;

	for (int i = 1; i <= a; i++)
	{
		cin >> b[i] >> c[i] >> d[i];

		e[i] = aa(b[i], c[i], d[i]);

	}

	for (int i = 1; i <= a; i++)
	{

		cout << ((e[i] != 0) ? "YES" : "NO") << endl;
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
const ll inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;

int N;

int main()
{
    cin >> N;
    for (int i = 0; i < N; i++)
    {
        int a, b, c;
        cin >> a >> 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;
    }
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		
		int s = 10;
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			if(m<=s)puts("YES");
			else puts("NO");
		}else{
			if(m<=s)puts("NO");
			else puts("YES");
		}
	}
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 10;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

C++: #include<iostream>

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

    return 0;
}

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

int main(){
    int n;
    cin >> n;
    int a,b,c;
    while(cin >> a >> b >> c){
        //cout << a << b << c << endl;
        if(pow(a,2.0)+pow(b,2.0)==pow(c,2.0) || pow(a,2.0)+pow(b,2.0)==pow(c,2.0) || pow(a,2.0)+pow(b,2.0)==pow(c,2.0)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

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

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

int main() {
int a,b,c,i,x=a*a,y=b*b,z=c*c;
cin>>i;
for(int n=1; n<=i; n++){
cin>>a>>b>>c;


if(x+y==z||x+z==y||y+z==x) {cout<<"YES";}
else{cout<<"NO";}	
}

// your code goes here
	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 ||
       b*b + c*c == a*a ||
       c*c + a*a == b*b){
      cout << "YES" << endl;
    }
    else cout << "NO" << endl;
  }
}

C++: #include <iostream>
int main(void){
	int n;
	std::cin>>n;
	while(n--){
		int a,i=3,b=0,c=0;
		for(;i--;){
			std::cin>>a;
			a*=a;
			b=a>b?a:b;
			c+=a;
		}
		std::cout<<(c==2*b?"YES\n":"NO\n");
	}
}

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

int main(){

	int n;
	for(cin >> n;n > 0;--n){
		int a, b, c, t;
		cin >> a >> b >> c;
		if(a>b && a>c){t=a;a=c;c=t;}
		if(a<b && b>c){t=b;b=c;c=t;}
		if(a*a + b*b == c*c)cout << "YES\n";
		else cout << "NO\n";
	}
	return 0;
}