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

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

int main(){
  int n;
  cin >> n;
  int a, b, c;
  while(n--){
    cin >> a >> b >> c;
    printf("%s\n", is_Right_Triangle(a, b, c) ? "YES" : "NO");
  }
  return 0;
}

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

using namespace std;

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

C++: #include<iostream>
int main(void){
	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>
#include <stdlib.h>
using namespace std;
int main()
{
	int N,a,b,c,d[1010],i=0,j=0;
	cin>>N;
	j=N;
		while(j--)
		{
			cin>>a>>b>>c;
			if (a*a+b*b==c*c)
				d[i]=1;
			else
				d[i]=0;
			i++;
		}
		for (i=0;i<N;i++)
		{
			if (d[i])
				cout<<"YES"<<endl;
			else
				cout<<"NO"<<endl;
		}
	return 0;
}

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

  return 0;
}

C++: #include <iostream>
#include <map>
#include <cstring>
#include <memory.h>
#include <vector>
#include <limits.h>
#include <cstdio>
#include <queue>
#include <math.h>
#include <algorithm>

using namespace std;

int main()
{
    int caseCount;
    cin >> caseCount;
    while(caseCount--){
        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>
#include <vector>
#include <algorithm>
using namespace std;

void solve() {
    vector<int> H = vector<int>(3);
    cin >> H[0] >> H[1] >> H[2];
    sort(H.begin(), H.end());
    int H1, H2, H3;
    H1 = H[2]; H2 = H[1]; H3 = H[0];
    
    if (H2*H2+H3*H3==H1*H1) {
    	cout << "YES" << endl;

    }else cout << "NO" << endl;
}

int main() {
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		solve();
	}
}

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

C++: #include<iostream>

using namespace std;

int main(){
  int n;
  int a,b,c;
  int tmp;
  cin >> n;
  for(int i=0;i<n;i++)
    {
      cin >> a >> b >> c;
    }

  if(a>c){
    tmp=a;
    a=c;
    c=tmp;
  }
  if(b>c){
    tmp=b;
    b=c;
    c=tmp;
  }

  if(a*a+b*b==c*c)
    cout >> "YES" >> endl;
  else
    cout >> "NO" >> endl;
  return 0;
}

C++: #include <stdio.h>

int fanc(int x, int y, int z)
{
	int r;
	if(x*x + y*y == z*z || x*x + z*z == y*y || z*z + y*y == x*x){
		r = 1;
	}
	else{ r = 0; }

	return r;
}


int main(void)
{
	int n;
	int i;
	int x, y, z;
	
	while(scanf("%d", &n) != EOF){
		for(i = 0; i < n; i++){
			scanf("%d %d %d", &x, &y, &z);
			if(fanc(x, y, z)){ puts("YES"); }
			else{ puts("NO");}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
int main(){
	using namespace std;
	int num,a;
	cin >> num;
	for(int i=0;i<num;i++){
		vector<int> tr;
		for(int j=0;j<3;j++){
			cin >> a;
			tr.push_back(a);
		}
		sort( tr.begin() , tr.end() );
		if((tr[0]*tr[0])+(tr[1]*tr[1])==(tr[2]*tr[2])){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}

C++: #include<stdio.h>
#include<math.h>
int main()
{
	int n,i;
	int a[1000],b[1000],c[1000];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d",&a[i],&b[i],&c[i]);
	}
	for(i=0;i<n;i++){
		if((double)(c[i]*c[i])==(double)(a[i]*a[i]+b[i]*b[i])){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	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 ||a*a+c*c==b*b ||b*b+c*c==a*a){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
}

C++: #include<stdio.h>
int main(void){
  int max,min,a,b,c,d,e,f,i,j;
int n[9999];
j=0;
scanf(" %d", &i);
while(j<i){
scanf(" %d %d %d",&a,&b,&c);
d=a+b;
e=a+c;
f=b+c;
if(a>b){
  if(a>c)
    max=a;
  else max=c;}
 else if(b>c)
   max=b;
     else max=c;
if(d<e){
  if(d<f)
    min=d;
  else min=f;}
 else if(e<f)
   min=e;
     else min=f;
 if(a*b*c==0)
   n[j]=0; 
 else if  (max<min)
   n[j]=1;
 else 
   n[j]=0;
 j++; 
}
for(j=0;j<i;j++){
  if(n[j])
    printf("YES\n");
  else 
    printf("NO\n");
 }
return 0;
}

C++: #include <iostream>

using namespace std;

void triangle_check(int max, int x, int y);

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

    cin >> n;

    while (n-- > 0) {
        cin >> a >> b >> c;

        if (a > b) {
            if (a > c) {
                triangle_check(a, b, c);
            }
            else {
                triangle_check(c, a, b);
            }
        }
        else {
            if (b > c) {
                triangle_check(b, a, c);
            }
            else {
                triangle_check(c, a, b);
            }
        }
    }

    return 0;
}

void triangle_check(int max, int x, int y) {
    if ( max*max == x*x + y*y )
        cout << "yes" << endl;
    else
        cout << "no" << endl;
}

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

 int main() {

	 int n = 0;
	 int a[3];
	 std::cin >> n;


	 while (std::cin>>a[0]>>a[1]>>a[2]) {

			 std::sort(a, a + 3);

			 if (a[2] * a[2] == a[1] * a[1] + a[0] * a[0]) {
				 std::cout << "YES" << std::endl;
			 }
			 else {
				 std::cout << "NO" << std::endl;
			 }

			 for (int d = 0; d < 3; ++d) {
				 a[d] = 0;
			 }
		
	 }

}

C++: #include <iostream>
#include <cstdio>
#include <iomanip>
#include <algorithm>
#include <cmath>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;

int main()
{
	int n;
	int a[1001], b[1001], c[1001];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i] ^ 2 == b[i] ^ 2 + c[i] ^ 2 || b[i] ^ 2 == a[i] ^ 2 + c[i] ^ 2 || c[i] ^ 2 == a[i] ^ 2 + b[i] ^ 2) {
			printf("YES\n");
		}
		else printf("NO\n");
	}
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x^2;
		y = y^2;
		z = z^2;
			if((x+y)==z||(x+z)==y||(y+z)==x){
				printf("Yes\n");
			}
			else {
				printf("No\n");
			}
		}
	return 0;
}