Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	nQueries := nextInt()
	for i := 0; i < nQueries; i++ {
		lengths := []int{nextInt(), nextInt(), nextInt()}
		sort.Slice(lengths, func(i, j int) bool { return lengths[i] > lengths[j] })
		if math.Pow(float64(lengths[0]), 2) == math.Pow(float64(lengths[1]), 2)+math.Pow(float64(lengths[2]), 2) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

C++: #include <iostream>

void checkTringle(int a,int b,int c){
    if(a * a == b * b + c * c){
        std::cout << "YES" << std::endl;
    }else{
        std::cout << "NO" << std::endl;
    }
}

int main(int argc, char *argv[])
{
    int dataSize;
    std::cin >> dataSize;

    int side[3];

    for(int i=0; i<dataSize; i++){
        for(int a=0; a<3;a++){
            std::cin >> side[a];
        }

        for(int b = 0; b< 3; b++){
            for(int j=b+1; j<3;j++){
                if(side[b] > side[j]){
                    int tmp = side[b];
                    side[b] = side[j];
                    side[j] = tmp;
                }
            }
        }

        
        checkTringle(side[2],side[1],side[0]);
    }
}

C++: #include<stdio.h>
int main(void)
{
	int n=1;
	int i=0;
	int a,b,c;
	int irekae=0;
	while(n!=0)
	{
		scanf("%d",&n);
		if (n==0)
		{
		
		}
		else
		{
			for (i=0;i<n;i++)
			{
				scanf("%d",&a);
				scanf("%d",&b);
				if (a<b)
				{
					irekae=a;
					a=b;
					b=irekae;
				}
				scanf("%d",&c);
				if (a>c)
				{
					irekae=a;
					a=c;
					c=irekae;
				}
				if (c*c==a*a+b*b)
				{
					printf("Yes\n");
				}
				else
				{
					printf("No\n");
				}
			}
		}
	}
}

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003
#include <iostream>
#include <algorithm>
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 d[3]; for (int i = 0; i < 3; i++) cin >> d[i];
		sort(d, d + 3);
		if (d[0] * d[0] + d[1] * d[1] == d[2] * d[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

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

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

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[2] * a[2]) == (a[1] * a[1] ) * (a[0] * a[0]))
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	}
	return 0;
}

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

int main(){
	int N = 0;
	int A, B, C;
	int i, j, k;
	int work;
	cin >> N;
	for(i = 0; i < N; i++){
		cin >> A >> B >> C;

		if( (A +B) > C && (B + C) >A && (C + A) > B){
				cout << "YES\n";				
		}
		
		else{
			cout << "NO\n";
		}
    }
    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(a>b) swap(a,b);
    if(b>c) swap(b,c);
    if(a>b) swap(a,b);
    a=a*a;
    b=b*b;
    c=c*c;
    if(a+b==c)
      cout<<"YES"<<endl;
    else 
      cout<<"NO"<<endl;
  }
  return 0;
}

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

using namespace std;

int main()
{
    int i,n,j,k,l;
    double a[3];
    cin >> n;
    while(n--)
    {
        for(i=0;i<3;i++)
            cin >> a[i];
        sort(a,a+3);
        if((sqrt(a[0]*a[0]+a[1]*a[1]))==(sqrt(a[2]*a[2])))
            cout << "YES" <<endl;
        else
            cout << "NO" <<endl;
    }
    return 0;



}

C++: fn main(){
    let n=readln();
    for _i in 0..n{
        let mut v:Vec<i64> = readln();
        v.sort();
        if v[0]*v[0] + v[1]*v[1]==v[2]*v[2] {
            println!("YES");
        }
        else{
            println!("NO");
        }
    }

}
    

// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
 
pub trait FromLn {
    fn fromln(s: &str) -> Self;
}
pub fn readln<T: FromLn>() -> T {
    let mut buf = String::new();
    let _ = ::std::io::stdin().read_line(&mut buf).unwrap();
    T::fromln(buf.trim())
}
pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
    let mut vs = vec![];
    for _ in 0..n {
        vs.push(readln());
    }
    vs
}
macro_rules! fromln_primitives {
    ($($t:ty),*) => { $(
        impl FromLn for $t {
            fn fromln(s: &str) -> $t {
                s.parse().unwrap()
            }
        }
    )* }
}
fromln_primitives!(
    String,
    bool,
    f32,
    f64,
    isize,
    i8,
    i16,
    i32,
    i64,
    usize,
    u8,
    u16,
    u32,
    u64
);
impl<T> FromLn for Vec<T>
where
    T: FromLn,
{
    fn fromln(s: &str) -> Vec<T> {
        s.split_whitespace().map(T::fromln).collect()
    }
}
impl FromLn for Vec<char> {
    fn fromln(s: &str) -> Vec<char> {
        s.chars().collect()
    }
}
macro_rules! fromln_tuple {
    ($($t:ident),*) => {
        impl<$($t),*> FromLn for ($($t),*) where $($t: FromLn),* {
            fn fromln(s: &str) -> ($($t),*) {
                let mut it = s.split_whitespace();
                let t = ($($t::fromln(it.next().unwrap())),*);
                assert_eq!(it.next(), None);
                t
            }
        }
    }
}
fromln_tuple!(A, B);
fromln_tuple!(A, B, C);
fromln_tuple!(A, B, C, D);
fromln_tuple!(A, B, C, D, E);
fromln_tuple!(A, B, C, D, E, F);

C++: //#include"bits/stdc++.h"
#include<iostream>
#include<ostream>
#include<vector>
#include<string>
#include<algorithm>

#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)


using namespace std;
using ll = long long;

void solve();

int main() {

   solve();
   return 0;

}

void solve() {

	vector<ll> v(3);
	ll n;

	cin >> n;

	REP(i, n) {
		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] || v[0]*v[0]+v[2]*v[2]==v[1]*v[1] || v[1]*v[1]+v[2]*v[2]==v[0]*v[0]? "YES": "NO") << endl;
	}

}

C++: #include<stdio.h>
int main(){
	int n,k[100]={0};
	int a,b,c;
	int i;
	
	scanf("%d",&n);
	for(i=0;i<n;i++){
		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){k[i]=1;}
	}
	for(i=0;i<n;i++){
		if(k[i]==1){printf("YES\n");}
		else{printf("NO\n");}
	}
	return 0;
}

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

int main() {
	int a, b, c, n, i;
	vector<int> A;
	vector<vector<int> > B;
	cin >> n;
		for (i = 0; i < n; i++) {
			cin >> a >> b >> c;
			A.push_back(a);
			A.push_back(b);
			A.push_back(c);
			sort(A.begin(), A.end());
			B.push_back(A);
			A.clear();
		}
		for (i = 0; i < n; i++) {
			if (B[i][2] * B[i][2] == B[i][0] * B[i][0] + B[i][1] * B[i][1]) cout << "YES" << endl;
			else cout << "NO" << endl;
	}
	return 0;
}