Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i:=0; i<n; i++{
	    data := nextInts(3)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int{
    a := make([]int, n)
    for i:=0; i<n; i++{
        a[i] = nextInt()
    }
    return a
}

C++: #include <stdio.h>
#include <math.h>
int main(void) {
	int a, b, c, t, x, y, z;
	
	scanf("%d %d %d",&a,&b,&c);
	
	t = a ; x = b ; y = c; 
	if(t<=b){
		t = b ; x = c ; y = a ;
	}
	if(t<=c){
		t = c ; x = a ; y = b ;
	}
	t = pow(t,2) ;x = pow(x,2); y = pow(y,2); z = sqrt((x+y));

	if(t==z){
		printf("YES");
	}
	else{
		printf("NO");
	}
	return 0;
}

C++: #include<stdio.h>
#include<algorithm>

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 20;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

C++: #include <iostream>

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 <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <cstdio>

using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;(i)>=0;(i)--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;

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

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

using namespace std;

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

C++: #include <stdio.h>
 
int triJudgefunc(int x, int y, int z);
 
int main(void)
{
    int row;
    scanf("%d", &row);
    for (int i = 0; i < row; ++i) {
        int firstn, secondn ,thirdn; 
        scanf("%d %d %d", &firstn, &secondn, &thirdn);
        if (triJudgefunc(firstn, secondn, thirdn) = true) {
        printf("YES\n");
        } else {
        printf("NO\n");
        }
    }
    return 0;
}
 
 
 
int triJudgefunc(int x, int y, int z)
{
    double maxlength, notmax1, notmax2;
    if (x > y) {    //x > y
        if (x > z) {
            maxlength = x, notmax1 = y, notmax2 = z;    //x???max
        } else {
            notmax1 = x, notmax2 = y, maxlength = z;    //z???max
        }
    } else {    //y > x
        if (y > z) {
            notmax1 = x, maxlength = y, notmax2 = z;    //y???max
        } else {
            notmax1 = x, notmax2 = y, maxlength = z;    //z???max
        }
    }
    double result = maxlength * maxlength - notmax1 * notmax1 - notmax2 * notmax2;
    return result;
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x*x;
		y = y*y;
		z = z*z;
		if(x>y&&x>z){
			if(x==(z+y))printf("YES\n");
			else printf("NO\n");
		}
		else if(y>z&&y>x){
			if(y==(x+z)) printf("YES\n");
			else printf("NO\n");
		}
		else {
			if(z==(x+y))printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}

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


int main(){
	int i;
	deque<int> nums;

	cin >> i;

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

		nums.push_front(a);
		nums.push_front(b);
		nums.push_front(c);

		sort(nums.begin(), nums.end());

		a = nums[0];
		b = nums[1];
		c = nums[2];

		if(a*a + b*b == c*c){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}

	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	int a = 0;
	int kazu = 0;
	int b = 0;
	int c = 0;
	for (int i = 0; i < kazu; i++)
	{
		cin >> a;
		cin >> b;
		cin >> c;
		if (a * a + b * b == c * c)
		{
			cout << "YES" << endl;
			return;
		}
		else if (a * a + c * c == b * b)
		{
			cout << "YES" << endl;
			return;
		}
		else if (c * c + b * b == a * a)
		{
			cout << "YES" << endl;
			return;
		}
		else
		{
			cout << "NO" << endl;
			return;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,n;
	cin>>n;
	for(int i=1;i<=n; i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}

}

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

int main() {
	vector<int> vec(3); int n; cin >> n;
	auto f_pow = [](int& temp) { temp = pow(temp, 2); };
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++) cin >> vec[j];
		sort(vec.begin(), vec.end());
		for_each(vec.begin(), vec.end(), f_pow);
		if (vec[0] + vec[1] == vec[2]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x^2;
		y = y^2;
		z = z^2;
			if((x+y)==z||(x+z)==y||(y+z)==x){
				printf("Yes\n");
			}
			else {
				printf("No\n");
			}
		}
	return 0;
}

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

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

		sort(a,a + 3);
		b = pow(a[1],2) + pow(a[0],2);
		if (pow(a[2],2) == b){
			cout << "YES";
		}
		else{
			cout << "NO";
		}
		cout << endl;
	}
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a, b, c, n;
  cin >> n;
  for(int i = 0;i < n;i++){
    cin >> a >> b >> c;
    if(b + c > a && a * a == b * b + c * c) cout << "YES\n";
    else if(a + c > b && b * b == a * a + c * c) cout << "YES\n";
    else if(a + b > c && c * c == a * a + b * b) cout << "YES\n";
    else cout << "NO\n"; 
  }

  return 0;
}

C++: #include"iostream"

using namespace std;

int main()
{
	int n;
	int a, b, c;
	cin >> n;
	while (n--) {
		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;
	}
	return 0;
}