Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}

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

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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

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

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

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#define rep(i, a, b) for(int i = a; i < b; i++)

using namespace std;
typedef long long ll;
string s;
int n;
int main(){
	cin >> n;
	rep(i, 0, n){
		vector<int> v(3);
		cin >> v[0] >> v[1] >> v[2];
		sort(v.begin(), v.end());
		
		if(v[2]*v[2] == v[1]*v[1] + v[0]*v[0]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

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

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

	while(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++: //--------------------------------------------------template----------------------------------------//
//c
#include <stdio.h>
#include <time.h>
#include <math.h>
//c++
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <sstream>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <complex>
#include <cmath>
//c++11
#include <tuple>
#define all(c) ((c).begin(),(c).end())
#define rall(c) (c).rbegin(),(c).rend()
//#define sort(v,n) sort(v,v+n)
//#define vsort(v) sort(v.begin(),v.end())
#define vvsort(v) sort(v.rbegin(),v.rend())
#define ll long long
#define pb(a) push_back(a)
#define fi first
#define se second
#define inf 999999999
using namespace std;
const ll MOD = 1e9 + 7;
const double PI = acos(-1.0);
//---------------------------------------------------------------------------------------------//
int n;

int main() {
	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" << endl;
		else cout << "NO" << endl;
	}
}

C++: #include <string>
#include <vector>
#include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int x,a[3];
    cin>>x;
    for(int i=1;i<x+1;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>
#include <cmath>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int x, y, z;
    cin >> x >> y >> z;
    int m = max(x, max(y, z));
    if (m == x) {
       if (x > y + z) cout << "YES";
       else cout << "NO";
    } else if (m == y) {
       if (y > x + z) cout << "YES";
       else cout << "NO";
    } else if (m == z) {
       if (z > x + y) cout << "YES";
       else cout << "NO";
    }
    cout << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
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];
		sort(a,a+3);
		cout << (a[0]*a[0]+a[1]*a[1]==a[2]*a[2]?"YES":"NO") << endl;
		
	}

	return 0;
}

C++: #include<iostream>

using namespace std;

int aa(int x, int y, int z) {

	return (((x ^ 2) + (y ^ 2) == (z ^ 2)) || ((x ^ 2) + (z ^ 2) == (y ^ 2)) || ((y ^ 2) + (z ^ 2) == (x ^ 2)));
}

int main() {

	int a, b[1000], c[1000], d[1000];
	bool e[1000];

	cin >> a;

	for (int i = 1; i <= a; i++)
	{
		cin >> b[i] >> c[i] >> d[i];

		e[i] = aa(b[i], c[i], d[i]);

	}

	for (int i = 1; i <= a; i++)
	{

		cout << ((e[i] != 0) ? "yes" : "no") << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cstring>
#include<algorithm>
#include<string>
#include<vector>
#include<map>
#include<cstdio>
#include<cmath>
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
	int n;
	cin>>n;
	rep(i,n){
		vector<int>in(3);
		rep(j,3)cin>>in[j];
		sort(all(in));
		cout<<in[0]<<endl;
		if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}

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

#define upper 1000
#define lower 1
#define eN 1000

using namespace std;


void swap(int& e1, int& e2, int& e3){
	if (e1 > e2){
		int tmp = e1;
		e1 = e2;
		e2 = tmp;
	}
	if (e2 > e3){
		int tmp = e2;
		e2 = e3;
		e3 = tmp;
	}
	if (e1 > e3){
		int tmp = e1;
		e1 = e3;
		e3 = tmp;
	}
}

bool check(int e1, int e2, int e3){
	if (((e1*e1)+(e2*e2)) == (e3*e3)){
		return true;
	}
	else{
		false;
	}
}

int main(void){
	int N = 0;
	cin >> N;
	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		cin >> e1 >> e2 >> e3;
		swap(e1,e2,e3);
		if (check(e1, e2, e3)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
#include <string>
#include <sstream>

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define repn(i, n) for(int i = 1; i <= (int)n; ++i)
#define pb push_back
#define lb lower_bound
#define mp make_pair
#define ite iterator
#define max2(x, y) ((x) > (y)) ? (x) : (y)
#define max3(x,y,z) max2((x), max2((y),(z)))
#define max4(v,w,x,y) max2(max2((v),(w)), max2((x),(y)))
#define min2(x, y) ((x) > (y)) ? (y) : (x)
#define min3(x,y,z) min2((x), min2((y),(z)))
#define min4(v,w,x,y) min2(min2((v),(w)), min2((x),(y)))
#define ul unsigned long
#define ull unsigned long long
#define INF 1000000007
#define MOD 1000000007
#define fs first
#define sd second

template<typename T>
bool elem(set<T> st, T val){
	return (st.find(val) != st.end());
}

template<typename T>
void printv(vector<T> vt){
    rep(i, vt.size() - 1)
        cout << vt[i] << " ";
    cout << vt[vt.size() - 1] << endl;
}

typedef vector<int> vint;
typedef vector<ul> vul;
typedef vector<ull> vull;
typedef pair<int, int> pii;


int main(void){
    int t;
    cin >> t;
    while(t-- > 0){
        vint a(3);
        rep(i, 3) cin >> a[i];
        sort(a.begin(), a.end());
        if(a[2]*a[2] == a[1]*a[1] + a[0]*a[0])
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
    return 0;
}