Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}
func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

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;
}

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

int main(){

  int i;
  int n[3];
  int temp;

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

  return 0;
}

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

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

	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

	int dataNum;
	int hen[1000][3];

	cin >> dataNum;
	for (int i = 0; i < dataNum; i++) {
		cin >> hen[i][0] >> hen[i][1] >> hen[i][2];
	}

	for (int i = 0; i < dataNum; i ++) {

		//????????????????????§?????????
		for (int j = dataNum - 1; j > 0; j--) {
			for (int k = 0; k < j; k++) {
				if (hen[k] > hen[k + 1]) {
					int dummy = hen[i][k];
					hen[i][k] = hen[i][k + 1];
					hen[i][k + 1] = dummy;
				}
			}
		}

		//??´?§?????????§??????
		if (hen[i][0] * hen[i][0] + hen[i][1] * hen[i][1] == hen[i][2] * hen[i][2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

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

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

	return 0;
}