Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Scan()
	l, _ := strconv.Atoi(sc.Text())
	for i := 0; i < l; i++ {
		sc.Scan()
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.Atoi(s[0])
		b, _ := strconv.Atoi(s[1])
		c, _ := strconv.Atoi(s[2])

		n := []int{a, b, c}
		sort.Sort(sort.IntSlice(n))

		if square(n[0])+square(n[1]) == square(n[2]) {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

C++: #include <iostream>
#include<algorithm>
using namespace std;
int main(){
    int a,b,c,d;
    cin>>d;
    for(int e=0;e<d;e++){
        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<stdio.h>


int main(){
  int i;
  int j = 0;
  scanf("%d",&i);
  // printf("%dツ嘉アツ禿シツ療債つオツづつュツつセツつウツつ「\n",i);
   while(j < i){
    int x,y,z;
    scanf("%d",&x);
    scanf(" %d",&y);
    scanf(" %d/n",&z);
    int X = x * x;
    int Y = y * y;
    int Z = z * z;
    if(X == 0 || Y == 0 || Z == 0){
      printf("NO\n");
    }else if(X == Y + Z){
      printf("YES\n");
    }else if(Y == X + Z){
      printf("YES\n");
    }else if(Z == X + Y){
      printf("YES\n");
    }else{
      printf("NO\n");
    }
    j++;
    // printf("%d %d %d\n",x,y,z);
   }
  return 0;
}

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

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

C++: #include<stdio.h>
int main(void)
{
	unsigned N=0;
    unsigned a[1001]={0},b[1001]={0},c[1001]={0};
	unsigned soto=0;
	unsigned i=0;
	scanf("%d",&N);
	for (i=0;i<N;i++)
	{
		scanf("%d %d %d",&a[i],&b[i],&c[i]);
		if (a[i]<b[i])
		{
			soto=a[i];
			a[i]=b[i];
			b[i]=soto;
		}
		if (a[i]<c[i])
		{
			soto=a[i];
			a[i]=c[i];
			c[i]=soto;
		}
	}
	for (i=0;i<N;i++)
	{
		if (a[i]*a[i]==b[i]*b[i]+c[i]*c[i])
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

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

int main()
{
	int N, 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;
}

C++: #include<stdio.h>

int main() {

	int i = 0;
	int N = 0;
	int a = 0, b = 0, c = 0;

	scanf("%d", &N);

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

		if(a * a + b * b == c * c) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}

	return 0;
}

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

using namespace std;
            
int main(){

    int n;
    int x ,y ,z;
    cin >> n;
    
    for(int i = 0; i < n; ++i){
	    cin >> x >> y >> z;
        if( x * x + y * y == z * z ||
            x * x + z * z == y * y ||
            z * z + y * y == x * x ){
            cout << "YES";
        }else{
              cout << "NO";
        }
        cout << endl;
	}
    
	return 0;
}

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

C++: #include <bits/stdc++.h>
#include<cmath>
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    cin>>n;
    while (n--)
        {
            int a,b,c;
            cin>>a>>b>>c;
            if (a*a + b*b == c*c)
            
                cout<<"YES"<<endl;
                else 
                    cout<<"NO"<<endl;
            
        }
    return 0;
}

C++: #include <stdio.h>

void main(){
	int a, b, c, N, i;

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

int chk(int a, int b, int c){
	int x;

	if(a >= b){
		x = a;
		a = b;
		b = x;
	}

	if(b >= c){
		x = b;
		b = c;
		c = x;
	}

	if(a >= b){
		x = a;
		a = b;
		b = x;
	}

	if(c*c == a*a + b*b) return 1;
	else return 0;
}

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

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

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

int main()
{
	int a[3],n;
	cin>>n;
	while(n>0){
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);

		if(a[0]*a[0] +a[1]*a[1]==a[2]*a[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		n--;
	}
}

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

int main() {
	int a;
	scanf("%d", &a);
	vector<int>b(3);
	for (int c = 0; c < a; c++) {
		scanf("%d%d%d", &b[0], &b[1], &b[2]);
		sort(b.begin(), b.end());
		if (b[0] * b[0] + b[1] * b[1] == b[2] * b[2])printf("YES\n");
		else printf("No\n");
	}
}

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

int check(int a,int b,int c)
{
	a=a*a;
	b=b*b;
	c=c*c;
	if(a>=b&&a>=c&&a==b+c)
		return 1;
	if(b>=a&&b>=c&&b==c+a)
		return 1;
	if(c>=a&&c>=b&&c==b+a)
		return 1;
	return 0;
}
int main()
{
	int N,a,b,c;
	cin>>N;
	while(N--){
		cin>>a;
		cin>>b;
		cin>>c;
		if(check(a,b,c))
			cout<<"YES"<<endl;
		else
			cout<<"NO"<<endl;
	}
}

C++: #include<iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;

    int x[n];
    int y[n];
    int z[n];

    for(int i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i] >> z[i];
    }

    for(int j = 0; j < n; j++)
    {
        if(x[j] * x[j] == y[j] * y[j] + z[j] * z[j]
        || y[j] * y[j] == z[j] * z[j] + x[j] * x[j] 
        || z[j] * z[j] == x[j] * x[j] + y[j] * y[j])
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }
}