Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	for i := 0; i < n; i++ {
		a := nextInt()
		b := nextInt()
		c := nextInt()
		if a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		continue
	}
}

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

  }

}

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

using namespace std;

int power(int a, int n){
  int result = a;
  for(int i = 1; i < n; i++){
    result *= a;
  }
  return result;
}

int main(){
  int n;
  cin >> n;
  vector<bool> result;
  for(int i = 0; i < n; i++){
    vector<int> tri;
    for(int j = 0; j < n; j++){
      int tmp;
      cin >> tmp;
      tri.push_back(tmp);
    }
    sort(tri.begin(),tri.end());
    if(power(tri[0],2) + power(tri[1],2) == power(tri[2],2)){
      result.push_back(true);
    }else{
      result.push_back(false);
    }
  }
  for(int i = 0; i < n; i++){
    if(result[i]){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }
  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N;

int main(){
    cin>>N;
    int a[N][3];
    rep(i,N){
        rep(j,3){
            cin>>a[i][j];
        }
    }
    rep(i,N){
        sort(a[i],a[i]+3);
        if(pow(a[i][0],2)+pow(a[i][1],2)==pow(a[i[2],2]){
            out("Yes");
        }
        else{
            out("No");
        }
    }
}

C++: #include <iostream>

using namespace std;

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

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

    int max = 0;
    for (int i = 0; i < 3; i++) {
      max = a[i] > max ? a[i] : max;
    }

    for (int i = 0; i < 3; i++) {
      a[i] = a[i] == max ? 0 : a[i];
    }

    max *max == a[0] * a[0] + a[1] * a[1] + a[2] * a[2] ? cout << "Yes" << endl
                                                        : cout << "No" << endl;
  }

  return 0;
}

C++: #include<stdio.h>
int main(){
int n,a,b,c,t;
scanf("%d",&n);
while(n--){
scnaf("%d %d %d",&a,&b,&c);
if(a<b){t=a;a=b;b=t;}
if(a<c){t=a;a=c;c=t;}
if(a*a==b*b+c*c)printf("Yes\n");
else            printf("No\n);
}
return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int a[3],n;
scanf("%d",&n);
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
scanf("%d",&a[j]);
}
sort(a,a+3);
if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])printf("Yes\n");
else printf("No\n");
}
}

C++: #include <iostream>
using namespace std;
bool ok(int a, int b, int c) { return a*a+b*b==c*c; }
int main()
{
    int a, b, c, n;
    cin >> n;
    while (n--) {
        cin >> a >> b >> c;
        if (ok(a, b, c) || ok(b, c, a) || ok(c, a, b)) cout << "YES";
        else cout << "NO";
        cout << endl;
    }
    return 0;
}