Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

func square(x int) int {
	return x * x
}

C++: #include <stdio.h>
#include <algorithm>

int main(){
	int i,n,a[3];
	scanf("%d",&n);
	for(i = 0;i < n;i++){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		std::sort(a,a + 3);
		if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

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

int main()
{
	int n;
	int a[3];
	cin >> n;
	
	for (int i = 0; i < n; i++)
	{
		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>

using namespace std;

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

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

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

int main() {
  int n;
  cin >> n;
  REP(i, n) {
    int a, b, c;
    cin >> a >> b >> c;
    string ans = "NO";
    if (a * a == (c * c - b * b)) ans = "YES";
    if (b * b == (a * a - c * c)) ans = "YES";
    if (c * c == (b * b - a * a)) ans = "YES";
    cout << ans << endl;
  }
  return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int N;
	for(int i=0;i<N;i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(a+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <algorithm>

using namespace std;


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

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

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

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

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

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

int main() {
	int x;
	vector<string> v;
	
	cin >> x;

	for(int i = 0; i < x; i++) {
		int data[3];
		for(int j = 0; j < 3; j++)
			cin >> data[j];
		sort(data, data + 3);

		if(data[2]*data[2] == data[0]*data[0] + data[1]*data[1]) {
			v.push_back("YES");
		} else {
			v.push_back("NO");
		}
	}

	for(int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

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

int main(){

	int l = 0, x = 0, y = 0, z = 0;

	cin >> l;

	for(int i=0; i < l ; i++){
		cin >> x >> y >> z;

		if( x * x == y * y + z * z ||  x * x + y * y == z * z ||  x * x + z * z == y * y){
			cout << "YES" << endl;
		}

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

	return 0;
}

C++: 
#include<stdio.h>
#include<math.h>
int main()
{
	int n,tmp;
	double a, b, c;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%d %d %d", &a, &b, &c);
		if (a > b)
		{
			tmp = a;
			a = b;
			b = tmp;
			if (b > c)
			{
				tmp = c;
				c = b;
				b = a;
				a = tmp;
				if (a > b)
				{
					tmp = a;
					a = b;
					b = tmp;
				}
			}
			else if (a > c)
			{
				tmp = c;
				c = a;
				a = c;
			}
		}
		else if (a > c)
		{
			tmp = c;
			c = a;
			a = c;
		}
		pow(c, 2.0);
		if (c= a*a + b*b)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
	}
	return 0;
}

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

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

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

C++: #include <stdio.h>

void swap(int* x, int* y)
{
    int swap = *x;
    *x = *y;
    *y = swap;
}

int main(void)
{
    int i, len1, len2, len3, n_iteration;

    scanf("%d", &n_iteration);

    for (i = 0; i < n_iteration; i++) {
        scanf("%d %d %d", &len1, &len2, &len3);
        if (len2 < len3) {
            swap(&len2, &len3);
        }
        if (len1 < len2) {
            swap(&len1, &len2);
        }
        if (len1 * len1 == len2 * len2 + len3 * len3) {
            printf("YES\n");
        } else {
            printf("NO\n");
        }
    }
    return 0;
}

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

int l[3][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

for(int j = 0; j < buf; j++){
	if(l[j][2]*l[j][2] == l[j][0]*l[j][0] +l[j][1]*l[j][1]){
		cout << "YES";
	}else{
		cout << "NO";
	}
	cout << endl;
}

return 0;
}

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

void judgement(int a, int b, 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<int> vector_a;
	vector<int> vector_b;
	vector<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 <cstdio>

int main(){
	int n;
	int a[3];
	scanf("%d",&n);

	for (int i=0;i<n;++i){
		for (int j=0;j<3;++j) scanf("%d",a+j);
		bool z=false;
		for (int k=0;k<3;++k)
			if (a[k]*a[k]+a[(k+1)%3]*a[(k+1)%3]==a[(k+2)%3]*a[(k+2)%3])
				z=true;
		if (z) print("YES\n");
		else print("NO\n");
	}
	return 0;
}