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<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define rep(i, n) for(int i=0;i<n;++i)
#define rrep(i, n) for(int i=n;i>=0;--i)
const int inf=1e9+7;
const ll mod=1e9+7;
const ll big=1e18;
const double PI=2*asin(1);

int main() {
  int N;
  cin>>N;
  vector<int> arr(3);
  string ans[N];
  for(int i=0;i<N;++i){
    cin>>arr[0]>>arr[1]>>arr[2];
    sort(arr.begin(), arr.end());
    if(arr[0]*arr[0]+arr[1]*arr[1]==arr[2]*arr[2]) ans[i] = "YES";
    else ans[i] = "NO";
  }
  for(int i=0;i<N;++i) cout<<ans[i]<<endl;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <math.h>

int max(int a, int b) {
	return a > b ? a : b;
}

void swap(int *a, int *b) {
	int temp = *a;
	*a = *b;
	*b = temp;
/*
	*a ^= *b;
	*b ^= *c;
	*a ^= *b;
*/
}

int main() {
	int a, b, c, m, i, n, f;

	scanf("%d", &n);
	for (i = 0; i < n; ++i) {
		scanf("%d%d%d", &a, &b, &c);

/*
		// バブルソート
		if (b < c) swap(&b, &c);
		if (a < b) swap(&a, &b);
		if (b < c) swap(&b, &c);

		// a > b > c が保証される
		if (a * a == b * b + c * c)
			printf("YES");
		else
			printf("NO");
*/

		m = max(max(a, b), c);

		if (m*m == a*a + b*b + c*c - m*m)
			printf("YES");
		else
			printf("NO");

		puts("");
	}

	return 0;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int main() {
	int N,E[3];
	scanf("%d",&N);
	for(int i=0;i<N;i++) {
		for(int j=0;j<3;j++) scanf("%d",&E[j]);
		sort(E,E+3);
		printf(((E[2]*E[2])==(E[0]*E[0]+E[1]*E[1]))?"YES\n":"NO\n");
	}
}

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

int check(int a,int b,int c){
	if(a*a+b*b==c*c) return 1;
	else return 0;
}

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int a,b,c;
		int aa,bb,cc;
		cin>>a>>b>>c;
		aa=a<b?a:b;
		bb=a<b?b:a;
		cc=bb<c?c:bb;
		bb=bb<c?bb:c;
		int ans=check(aa,bb,cc);
		if(ans) cout<<"YES"<<endl;
		else    cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
using namespace std;
typedef long long int ll;

int main(){
	int n; cin >> n;
	int a,b,c;
	while(scanf("%d %d %d",&a,&b,&c)!=EOF){
		if(a>c)swap(a,c);
		if(a>b)swap(a,b);
		if(b>c)swap(b,c);
		if(a*a+b*b==c*c)cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

C++: #include <iostream>

using namespace std;

int main(){
    int N;
    cin>>N;
    if(cin.eof())return 0;

    while(N--){
        int x,y,z;
        cin>>x>>y>>z;
        if((x^2+y^2)==(z^2)||(x^2+z^2)==(y^2)||(y^2+z^2)==(x^2))cout<<"YES\n";
        else cout<<"NO\n";
    }
}

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


int main()
{
	int n,a,b,c;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		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;
}

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

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
}

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

int main(void) {
    int length[3];
    int n;
    int A, B, C;
    
    cin >> n;
    
    for(int i = 0; i < n; ++i) {
        cin >> length[0] >> length[1] >> length[2];
        sort(length, length + 3);
        A = length[0];
        B = length[1];
        C = length[2];
        if(A*A + B*B == C*C) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

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

void rate() {
int x, y, z;
	cin >> x >> y >> z;
	if (x*x + y*y == z*z || y*y + z*z == x*x || z*z + x*x == y*y) {
		cout << "YES\n";
	}
	else {
		cout << "NO\n";
	}

}

int main() {
	int i, k;
		cin >> k;
		for (i = 1; i <= k; i = i + 1) {
			rate();
		}
	
	return 0;
}

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

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

using namespace std;

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

int main(void){
	int N;
	cin >> N;

	vector<bool> result;

	for (int i=0; i<N; ++i){
		int e1, e2, e3;
		vector<int> len;
		cin >> e1 >> e2 >> e3;
		len.push_back(e1);
		len.push_back(e2);
		len.push_back(e3);
		sort(len.begin(), len.end());
		result.push_back(check(len[0],len[1],len[2]));
	}
	for (int i=0; i<N; ++i){
		if (result[i] == true){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
	int N,a,b,c;
	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;
		}
	}
	return 0;
}

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

int main(void)
{

	int a,b,c;
	int n;

	scanf("%d", &n);
	while(n--, n >= 0){
		scanf("%d %d %d", &a, &b, &c);

		a *=a;
		b *=b;
		c *=c;

		if(a == b+c || b == a+c || c == a+b)
			printf("YES\n");
		else
			printf("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*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b)
            cout << "YES" << endl;
        else
            cout << "NO" << endl; 
    }


    return 0;
}

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

int main(void)
{
	int16_t data_num = 0;
	int16_t first = 0;
	int16_t second = 0;
	int16_t third = 0;
	
	std::cin >> data_num;


	std::array<int16_t, 3> sides;

	for (int i = 0; i < data_num; i++)
	{
		std::cin >> sides[0] >> sides[1] >> sides[2];

		std::sort(sides.begin(), sides.end());
		
		if ( std::pow(sides[2], 2) == (std::pow(sides[0], 2) + std::pow(sides[1], 2)) )
		{
			std::cout << "YES" << std::endl;
		}
		else
		{
			std::cout << "NO" << std::endl;
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    int a , b , c ,test;

    cin>>test;

    for(int i{0};i<test;i++){
        cin>>a>>b>>c;

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

    }

    return 0;
}