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 <iostream>
#include <algorithm>

int isRightTriangle(int a, int b, int c)
{
	int s[3] = {a, b, c};
	std::sort(s, s+3);
	return (s[0] > 0) && (s[2] * s[2] == s[0] * s[0] + s[1] * s[1]);
}

int main()
{
	int count = 0;
	std::cin >> count;
	for (int i = 0; i < count; ++i) {
		int a = 0, b = 0, c = 0;
		std::cin >> a >> b >> c;
		std::cout << (isRightTriangle(a,b,c) ? "YES" : "NO") << std::endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	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<math.h>
#include<algorithm>
using namespace std;

void erabu(double* a, double* b,double* c) {
	if (*a > *b) {
		swap(*a, *b);
	}
	if (*b > *c) {
		swap(*b, *c);
	}
	if (*a > *b) {
		swap(*a, *b);
	}
}
int main() 
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		double a, b, c;
		cin >> a >> b >> c;
		erabu(&a, &b, &c);
		if (pow(c, 2) == pow(a, 2) + pow(b, 2)) {
			cout << "Yes" << endl;
		}
		else cout << "No" << endl;
	}

	return 0;
}

C++: class Tenmou{
public class HelloWorld {
    public static void main (String[] args) {

	int n;
	int a,b,c;
	int a[3];
	string str[];
	
	n = Integer.parseInt(br.readLine());
	str[]=new str[n];
	for(int i=0;i<n;i++){

	a = Integer.parseInt(br.readLine());
	b = Integer.parseInt(br.readLine());
	c = Integer.parseInt(br.readLine());

	a[0]=max(a,b,c);
	if(a[0]==a){
		a[1]=b;
		a[2]=c;
	}elseif(a[0]==b){
		a[1]=a;
		a[2]=c;
	}elseif(a[0]==c){
		a[1]=b;
		a[2]=a;
	}
	if(a[0]^2==a[1]^2+a[2]^2){
		str[i]="YES";
	}else{
		str[i]="NO";
	}
	}

	for(int i=0;i<n;i++){
				System.out.println(str[i]);
	}
    }
}
}

C++: #include <iostream>


bool isTriangle(int a, int b, int c) {
  int a2 = a*a, b2 = b*b, c2=c*c;
  int sum = a2 + b2 + c2;
  if ((sum - 2 * std::max(std::max(a2, b2), c2)) == 0)
    return true;
  else
    return false;
}


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

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;
continue;
}
}
}
  cout<<"NO"<<endl;


}
return 0;
}

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



//int main(){
// int a[10];
// for(int i=0;i<10;i++){
//  cin>>a[i];
// }
// sort(a,a+10);
// for(int i=9;i>6;i--)
//  cout<<a[i]<<endl;
//return 0;
//}


//int main(){
//	int a,b,ans;
//	while(cin>>a>>b){
//		a+=b;
//		ans=1;
//		while(a/10){
//			a/=10;
//			ans++;
//			}
//		cout<<ans<<endl;
//	}
//	return 0;
//}

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);
		cout<<((a[0]*a[0]+a[1]*a[1]-a[2]*a[2])?"NO":"YES")<<endl;
	}
	return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <queue>
#include <vector>
using namespace std;

int main()
{
	double a,b,c;
	int n,i;
	priority_queue< double, vector<double>, greater<double> > que;

	scanf("%d",&n);

	for(i = 0; i < n; i++){
		scanf("%lf %lf %lf",&a,&b,&c);
		que.push(a);
		que.push(b);
		que.push(c);
		a = que.top();
		que.pop();
		b = que.top();
		que.pop();
		if(pow( que.top(),2.0 ) == pow( a,2.0 ) + pow( b,2.0 )){
			printf("YES\n");
		}
		else{
			//printf("%lf %lf\n",pow( que.top(),2.0 ),pow( a,2.0 ) + pow( b,2.0 ));
			printf("NO\n");
		}
		que.pop();
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,a,b,c;
    cin >> n;
    while(n--){
        cin >> a >> b >> c;
        if(a<b) swap(a,b);
        if(a<c) swap(a,c);
        if((a*a)==(b*b+c*c))    cout << "YES\n";
        else cout << "NO\n";
    }
}

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*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b) cout << "YES\n";
		else cout << "NO\n";
	}
}

C++: #include <iostream>

using namespace std;

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

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

        if (isRight(a, b, c) || isRight(b, c, a) || isRight(c, a, b)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

using namespace std;

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

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    while(n--)
    {
        int a, b, c;
        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\n";
        else
            cout<<"NO\n";
    }
    return 0;
}

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

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  int i, n, a, b, c;
  vector<int> triangle;
  cin >> n;

  for (i = 0; i < n; i++) {
    cin >> a;
    cin >> b;
    cin >> c;
    triangle.push_back(a);
    triangle.push_back(b);
    triangle.push_back(c);

    sort(triangle.begin(), triangle.end());
    if (triangle.at(0) * triangle.at(0) + triangle.at(1) * triangle.at(1) == triangle.at(2) * triangle.at(2)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }

    triangle.clear();
  }

  return 0;
}

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

int main()
{
    vector<int> a(3);
    cin >> a[0];
    while (cin >> a[0] >> a[1] >> a[2])
    {
        sort(a.begin(), a.end());
        if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
}