Go: package main

import "fmt"

func main() {
	var n int

	fmt.Scanf("%d", &n)

	var a, b, c int
	for i := 0; i < n; i++ {
		var isTriangle bool
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a {
			isTriangle = true
		}

		if isTriangle == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

using namespace std;

int main() {

  int n;

  int a,b,c;

  cin >> n;

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

    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" << endl;

    else cout << "NO" << endl;

  }

  return 0;

}

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

using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int N;
  cin >> N;
  for (int i = 0; i < N; i ++) {
    int a, b, c;
    cin >> a >> b >> c;
    int aa = a * a, bb = b * b, cc = c * c;
    if (aa + bb == cc || bb + cc == aa || cc + aa == bb) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
}

C++: #include <iostream> 
#include <math.h> 
#include <iomanip> 
using namespace std;  
  
int main()  
{  
int num,a,b,c;
cin >> num;
for(int i=1;i<=num;i++)
{cin >> a >> b >> c;
if(a <= b && b <= c && a*a+b*b==c*c)
{cout << "YES" << endl;}
else if(a <= c && c <= b && a*a+c*c==b*b)
{cout << "YES" << endl;}
else if(b <= a && a <= c && a*a+b*b==c*c)
{cout << "YES" << endl;}
else if(c <= a && a <= b && a*a+c*c==b*b)
{cout << "YES" << endl;}
else if(b <= c && c <= a && b*b+c*c==a*a)
{cout << "YES" << endl;}
else if(c <= b && b <= a && b*b+c*c==a*a)
{cout << "YES" << endl;}
else
{cout << "NO" << endl;}
}
}

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

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

C++: #include <iostream>
using namespace std;
bool judge(int,int,int);

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

bool judge(int a, int b, int c){
    if (a > b && a > c && a * a == b * b + c * c){
        return true;
    }else if(b > a && b > c && b * b == c * c + a * a){
        return true;
    }else if(c > a && c > b && c * c == a * a + b * b){
        return true;
    }else{
        return false;
    }
}

C++: #include <stdio.h>

int main(void)
{
	int a,b,c,i,k;
	int sort[3];
	int num;
	int max,mid,min;
	int d=1,n=3;
	num<=1000;
	
	scanf("%d",&num);
	
	
    while(d<=num){
		scanf("%d %d %d",&sort[0],&sort[1],&sort[2]);
		for(n=3;n<=1;n--){
			for(i=0;i<=n-1;i++){
				if(sort[i]>sort[i+1]){
						k=sort[i];
						sort[i]=sort[i+1];
						sort[i+1]=k;
					}
			}
		}
		max=sort[2];
		mid=sort[1];
		min=sort[0];
		if(max*max==mid*mid+min*min){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		d++;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;

/**
 * vector<int>ar(3);
 * for(auto&e:ar){
 *     scanf("%d",&e);
 * }
 * sort(ar.begin(),ar.end())
 * int sum=accumulate(ar.begin(),ar.end(),0);
 **/

int main(){
    int mod=1000000007;
    int n;
    scanf("%d",&n);
    for (int i=0;i<n;i++) {
        vector<int> l(3);
        for (auto&e:l) {
            scanf("%d",&e);
        }
        sort(l.begin(),l.end());
        printf((l[0]*l[0]+l[1]*l[1]==l[2]*l[2])?"YES\n":"NO\n");
    }
    return 0;
}

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

int main(){
	const int N = 3;
	int l[N];
	int n;
	cin >> n;
	for(int i = 0; i < n; ++i) {
		cin >> l[0] >> l[1] >> l[2];
		sort(l, l + N);
		if(l[0] * l[0] + l[1] * l[1] == l[2] * l[2]) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	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(c < a || c < b){
			int* x = (a > b) ? &a : &b;
			int temp  = c;
			c = *x;
			*x = temp;
		}
		cout << ((a*a + b*b == c*c) ? "YES" : "NO" )<< endl;
	}
}

C++: #include<stdio.h>
#include<string.h>
#define N 3

int main()
{
    int i, j, a, b, c;
    int A[N][N];

    scanf("%d",&a);
    for(i=0;i<a;i++){
        for(j=0;j<N;j++){
            scanf("%d", &b);
            if(1<=b && b<=1000 && j!=0 && b<A[i][j-1]){
                c = A[i][j-1];
                A[i][j-1] = b;
                A[i][j] = c;
            }else{
                A[i][j] = b;
            }   
        }   
            
    }   
    for(i=0;i<a;i++){
        if(A[i][0]*A[i][0]+A[i][1]*A[i][1]==A[i][2]*A[i][2]){
            printf("YES\n");
        }else{
            printf("NO\n");
        }   
    }   
    return 0;
}

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

void judgement(int a,int b,int c) {
	if (a == b && b == c || a <= 0 || b <= 0 || c <= 0) {
		cout << "NO" << endl;
		return;
	}
	else if ((a*a) == (b*b) + (c*c) || (b*b) == (a*a) + (c*c) || (c*c) == (a*a) + (b*b)) {
		cout << "YES" << endl;
		return;
	}
	else {
		cout << "NO" << endl;
		return;
	}
}

unsigned int main() {
	unsigned 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<iostream>
#include<utility>
#include<climits>
using namespace std;

int main()
{
	double a, b, c;
	int n;

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

		if (pow(a, 2)  == pow(b, 2) + pow(c, 2)
			||pow(b, 2)  == pow(c, 2) + pow(a, 2)
			||pow(c, 2)  == pow(a, 2) + pow(b, 2))
		{cout << "YES" << endl;}
		else {cout << "NO" << endl;}
	}

	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v; ll w; };

ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

int calc(int k) {
	return (ll)k * (k - 1) / 2;
}

int main() {
	int N; cin >> N;
	while (N--) {
		vector<int> v(3);
		cin >> v[0] >> v[1] >> v[2];
		sort(v.begin(), v.end());
		cout << (v[0] * v[0] + v[1] * v[1] == v[2] * v[2] ? "YES" : "NO") << endl;
	}
}

C++: #include <bits/stdc++.h>
using  namespace std;
#define ll    long long int
#define pai     pair<int,int>
#define vi      vector<int>
#define vd      vector<double>
#define mpi     map<int,int>
#define mps     map<string,int>
#define sti     stack<int>
#define stc     stack<char>
#define sei     set<int>
#define ses     set<string>
#define multii  multiset<int>

 int main()
{
  /*#ifndef ONLINE_JUDGE
  freopen("tin.txt","r",stdin);
  freopen("tout.txt","w",stdout);
  #endif*/
  ll t;
  cin>>t;

  while(t--){
  ll 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;
  }

  }

}