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<stdio.h>

int main(void){
	int kosu,a[5]={0},temp,right,temp2,left;

	scanf("%d",&kosu);

	for(temp=0;temp<kosu;temp++){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		
		for(int i=0;i<3;i++){
			for(int j=0;j<3;j++){
				if(a[j]<a[j+1]){
					temp2=a[j];
					a[j]=a[j+1];
					a[j+1]=temp2;
				}
			}
		}
		right=(a[2])*(a[2])+(a[1])*(a[1]);
		
		left=(a[0])*(a[0]);
		
		if(left==right){
			printf("YES\n");
		}
		else{
			printf("NO\n");
		}
	}
	return 0;
}

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

int n;
int edge[3];

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

C++: #include <iostream>

using namespace std;

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

C++: #include<stdio.h>

int main(){
  int N = 0 ,i,j,k,tmp = 0;
  int tri[3] = {0,0,0};
  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%d %d %d",&tri[0],&tri[1],&tri[2]);
    for(j = 0;j <= 2;j++){
      for(k = j + 1;k <= 2;k++){
	tmp = tri[j];
	tri[j] = tri[k];
	tri[k] = tmp;
      }
    }
    if(tri[0] * tri[0] == tri[1] * tri[1] + tri[2] * tri[2]){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
  }
  return 0;
}

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

using namespace std;

int main(){
	int n, a[3];

	cin >> n;
	while (n-- > 0) {
		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>
#include <algorithm>

using namespace std;

int main(){
    int a[3];
    int N; cin >> N;
    while(N--){
        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;
    }
}

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

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;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) {
        vector<int> v(3);
        REP(j, 3) {
            cin >> v[i];
        }
        sort(ALL(v));
        if (pow(v[0],2)+pow(v[1],2)==pow(v[2],2)) cout << "YES" << endl;
        else cout << "NO" << endl; 
    }
    return 0;
}

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

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

C++: #include <iostream>

bool isRightTriangle(int a, int b, int c);

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

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

C++: #include<stdio.h>

int main(void)
{
  int n;
  int a[100],b[100],c[100];
  int i;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    scanf("%d",&b[i]);
    scanf("%d",&c[i]);
  }
  for(i=0;i<n;i++){
    if((c[i]*c[i]==a[i]*a[i]+b[i]*b[i]) ||
       (a[i]*a[i]==b[i]*b[i]+c[i]*c[i]) ||
       (b[i]*b[i]==a[i]*a[i]+c[i]*c[i])){
      printf("YES\n");
    }
    else{
      printf("NO\n");
    }
  }
  return(0);
  }

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

int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int a, b, c;
		cin >> a >> b >> c;
		int x, y, z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = (a+b+c) - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
      return 0;
}

C++: #include <iostream>

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

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

#define F(I,J,N) for(int I=J;I<N;I++)
int main(){
  int a,b,c,n;
  cin >>n;
  F(i,0,n){
    priority_queue<int> q;
    cin>>a>>b>>c;
    q.push(a);
    q.push(b);
    q.push(c);
    a=q.top();q.pop();
    b=q.top();q.pop();
    c=q.top();q.pop();
    bool f=false;
    if(a*a==(b*b+c*c))f=true;
    if(f) cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
}

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

bool IsRightTriangle(const int a, const int b, const int c)
{
	vector<int> SideLength(3);
	SideLength[0] = a;
	SideLength[1] = b;
	SideLength[2] = c;
	sort(SideLength.begin(), SideLength.end(), greater<int>());
	if(SideLength[0] * SideLength[0] == SideLength[1] * SideLength[1] + SideLength[2] * SideLength[2]){
		return true;
	}else{
		return false;
	}
}

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

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

using _i64 = int64_t;
using _u64 = uint64_t;
using _f64 = double;

#define _for(i, start, end) for(_i64 i = (_i64)start; i < (_i64)end; ++i)
#define _rep(i, number) _for(i, 0, number)
#define _foreach(e, data) for(auto& e : data)
#define _all(data) data.begin(), data.end()

template<typename type>
_i64 _size(const type& data) { return static_cast<_i64>(data.size()); }
template<typename type, size_t size>
_i64 _size(const type (&)[size]) { return static_cast<_i64>(size); }

enum _flag : bool { able = true, disable = false };

struct _time {
    _time(_flag flag) { check = flag; if(!check) { return; } gettime(start); }
    ~_time() {
        if(!check) { return; }; gettime(end);
        _i64 elapse = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cout << endl << "Time: " << elapse << " ms" << endl;
    }
    private:
    using _timer = chrono::time_point<chrono::system_clock>;
    _timer start, end; bool check;
    void gettime(_timer& time) { time = chrono::system_clock::now(); }
};

struct _ini { _ini() { ios::sync_with_stdio(false); cin.tie(nullptr); } } _ini;

int main() {
    {
        _time time(disable);
        _i64 N; vector<_i64> l(3); cin >> N; 
        _rep(i, N) {
            _foreach(e, l) { cin >> e; } sort(_all(l));
            cout << (pow(l[0], 2) + pow(l[1], 2) == pow(l[2], 2) ? "YES" : "NO") << endl;
        }
    }
    return 0;
}