Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

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

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

C++: #include <stdio.h>
int main(void){
   int i,N,a,b,c;
   scanf("%d",&N);
   for(i=1;i<=N;i++){
       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)
     && (a > 0 && b > 0 && c > 0)) {
       printf("YES\n");
   }
 else {
   printf("NO\n");
 }  
     }
   return 0;   
}

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

int main() {
	int data_sets_num = 0;		//??\???????????????????????????????????°
	std::vector<string> result;
	
	cin >> data_sets_num;
	for (int i = 0; i < data_sets_num; i++) {
		int first, second, third;

		cin >> first >> second >> third;
		if (
			(first * first == second * second + third * third) ||
			(second * second == first * first + third * third) ||
			(third * third == second * second + first * first)
			) {
			result.push_back("YES");
		}
		else {
			result.push_back("NO");
		}
	}

	for (unsigned int j = 0; j < result.size(); j++) {
		cout << result[j] << endl;
	}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
	int a;
	cin>>a;
	for(int b=0;b<a;b++){
		vector<int>c(3);
		for(int d=0;d<3;d++)cin>>c[d];
		sort(c.begin(),c.end());
		if(c[0]*c[0]+c[1]*c[1]==c[2]*c[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
		}
}

C++: 
#include <iostream>

using namespace std;

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

int main() {
    int n;
    cin >> n;
    while(n--) {
        int a, b, c;
        cin >> a >> b >> c;
        if(right(a,b,c) || right(a,c,b) || right(b,c,a)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

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

void swap(int& a, int& b) {
	int x = a;
	a = b;
	b = x;
}

void mySort(int& a, int& b, int& c) {
	int min = 0;
	int mid = 0;
	int max = 0;

	max = a;
	mid = b;
	if(mid >= max)	swap(mid, max);
	min = c;
	if(min >= mid)	swap(min, mid);
	if(mid >= max)	swap(mid, max);
	a = min;
	b = mid;
	c = max;
}

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

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

int main() {
    int N;
    cin >> N;
    int a, b, c;
    while (N--) {
        cin >> a >> b >> c;
        int l=max(a,max(b,c));
        int x, y;
        if (a==l) {
            x=b;
            y=c;
        } else if (b==l) {
            x=a;
            y=c;
        } else if (c==l) {
            x=a;
            y=b;
        }
        if (l==sqrt(pow(x,2)+pow(y,2))) {
            printf("Yes\n");
        } else {
            printf("No\n");
        }
    }
    return 0;
}

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

using namespace std;

int main(){

	int i, m;
	cin >> m;

	for(i=0; i<m; i++){

	int a[3];

	cin >> a[0] >> a[1] >> a[2];
	sort(a, a+3);

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