Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	li := make([]int, 3)

	sc.Scan()
	N, _ := strconv.Atoi(sc.Text())

	for i := 0; i < N; i++ {
		for j := 0; j < 3; j++ {
			sc.Scan()
			x, _ := strconv.Atoi(sc.Text())
			li[j] = x
		}
		sort.Ints(li)

		switch li[2]*li[2] == li[1]*li[1]+li[0]*li[0] {
		case true:
			fmt.Println("YES")
		case false:
			fmt.Println("NO")
		default:
		}
	}

}

C++: #include<iostream>
#include<algorithm>
using namespace std;
 
int main(void){
    int n;
    cin >> n;
    for(int i=0; i<n; i++){
        int a[3];
        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;
    }
    return 0;
}

C++: #include<iostream>
#include<sstream>
#include<cstdio>
#include<fstream>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdlib>
using namespace std;
bool power(int c,int a,int b){
	return pow(c,2)==(pow(a,2)+pow(b,2));
}
int main(){
	int n;
	scanf("%d",&n);
	stringstream buf;
	for(int x=0;x<n;++x){
		int i,j,k;
		scanf("%d %d %d",&i,&j,&k);
		if(power(i,j,k) || power(j,i,k) || power(k,i,j)){
			buf<<"YES\n";
		}else{
			buf<<"NO\n";
		}
	}
	cout<<buf.str();
	return 0;
}

C++: /* Is it a Right Triangle? */

#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;

  for (int i = 0; i < n; i++) {
    int a, b, c;
    int result;
    cin >> a >> b >> c;
    if (a >= b && a >= c) result = a * a - (b * b + c * c);
    else if (b >= a && b >= c) result = b * b - (a * a + c * c);
    else result = c * c - (a * a + b * b);

    if (result == 0) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

  return 0;
}

C++: #include<cstdio>
int main(){
	int n;
	int a,b,c;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d %d %d",&a,&b,&c);
		int max;
		char max_c;
		if(a>b) {max_c = 'a';}
		else {max_c = 'b';}
		if(c > max) {max_c = 'c';}
		
		if(max_c == 'a'){
			if(a*a == b*b + c*c) printf("YES\n");
			else printf("NO\n");
		}
		else if(max_c == 'b'){
			if(b*b == c*c + a*a) printf("YES\n");
			else printf("NO\n");
		}
		else{
			if(c*c == a*a + b*b) printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}

C++: #include<iostream>
 
bool right_triangle(int a,int b,int c)
{
    if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) {
        return true;
    }else{
        return false;
    }   
}
 
int main()
{
    int x,y,z,N;
    std::cin >> N;
    for (int i = 0; i < N; i++) {
        std::cin >> x >> y >> z;
        if (right_triangle(x,y,z)) {
            std::cout << "Yes" << std::endl;
        }else{ 
            std::cout << "No" << std::endl;
        }
    }   
    return 0;
}

C++: #include<stdio.h>
int main()
{
	int a, b, c, d, c2;
	a = 0;
	b = 0;
	c = 0;
	d = 0;
	c2 = 0;
	while(scanf("%d %d %d", &a, &b, &c))
	{
		d = a * a + b * b;
		c2 = c * c; 
		if( d == c2 )
		{
			printf("YES");
		}
		else
		{
			printf("NO");
		}
	}
}

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

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

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

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

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

void judgement(unsigned int a, unsigned int b, unsigned int c) {
	if ((a ^ 2) == (b ^ 2) + (c ^ 2) || (b ^ 2) == (a ^ 2) + (c ^ 2) || (c ^ 2) == (a ^ 2) + (b ^ 2)) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

int main() {
	int n;//dataset

	cin >> n;

	vector<unsigned int> vector_a;
	vector<unsigned int> vector_b;
	vector<unsigned int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include <iostream>

using namespace std;

int main(void)
{
	int i;
	int a[3];

	for(i = 0; i < 3; i++){
		cin >> a[i];
	}
	a[0] = a[0]^2;
	a[1] = a[1]^2;
	a[2] = a[2]^2;

	if((a[0] == (a[1] + a[2])) || (a[1] == (a[0] + a[2])) || (a[2] == (a[0] + a[1]))){
		cout << "OK " << endl;
	}
	else{
		cout << "NG" << endl;
	}
	return 0;
	
}

C++: #include<iostream>
using namespace std;
int i,j,d,k,n1,n2,n3,temp;
 int l[3];

int rt()
{
//入力
cin >> n1 >> n2 >> n3;
while(n1 < 1 or n1 > 1000 or n2 < 1 or n2 >1000 or n3 < 1 or n3 > 1000){
cin >> n1 >> n2 >> n3;
}
if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[0]=n1;
       l[1]=n2;
       l[2]=n3;
        for (i = 0; i < 2; i++) {
        for (j = 2; j > i; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[j];  
                l[j] = l[j - 1];
                l[j - 1] = temp;
            }
        }
    }
 }
    if(l[2]*l[2] == (l[1]*l[1]+l[0]*l[0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}



int main(){

   cin >> d;
   while(d <= 1 or d >= 1000){
       cin >> d;
   }

for(k=0;k<d;k++){
    rt();
}

    return 0;
}

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

int main() {

    int N;
    cin >> N;
 
    int hen[3];
    while (N --> 0) {
        cin >> hen[0] >> hen[1] >> hen[2];
        sort(hen, hen + 3);
        
        if (hen[2] * hen[2] == hen[0] * hen[0] + hen[1] * hen[1]) {
            cout << "YES";
        } else {
            cout << "NO";
        }
    }
    

    return 0;
}

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

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

C++: 
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>

using namespace std;


bool solve(){

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

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	int n;
	cin>> n;
	for(int i=0;i<n;i++){
		solve();
	}

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
bool is_right_triangle (int a, int b, int c) {
	if (b < a) std::swap(a, b);
	if (c < b) std::swap(b, c);
	if (b < a) std::swap(a, b);
	return (a * a + b * b == c * c);
}
int main(){
	int cnt;
	cin >> cnt;
	for (int i = 0; i < cnt; ++i) {
		int a, b, c;
		cin >> a >> b >> c;
		if (is_right_triangle(a, b, c))		cout << "YES";
		else								cout << "NO";
		cout << "\n";
	}
    return 0;
}

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;
if(a+b>c)
{
if(a+c>b)
{
if(b+c>a)
{
cout<<"YES"<<endl;
}
}
}
else
  cout<<"NO"<<endl;


}
return 0;
}