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 <vector>
#include <algorithm>

int main() {
	int N,a,b,c;
	std::cin >> N;
	while(std::cin >> a >> b >> c){
		std::vector<int> vec;
		vec.push_back(a);
		vec.push_back(b);
		vec.push_back(c);
		std::sort(vec.begin(), vec.end());
		if(vec.at(0) * vec.at(0) + vec.at(1) * vec.at(1) == vec.at(2) * vec.at(2))
			std::cout << "YES" <<std::endl;
		else
			std::cout << "NO" <<std::endl;
	}

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

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

int main(){

	int N;
	cin >> N;

	for (int i = 0; i < N; i++){
		int a[3];
		for (int j = 0; j < 3; j++)
			cin >> a[j];
		sort(a, a + 3);

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

	return 0;
}

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

using namespace std;

int N;
int a,b,c;

int main(){
	cin >> N;

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

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

    return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	int N;
	int count=0;
	int a[3];
	scanf("%d ",&N);
	while(count!=N){
	for(int i=0;i<3;i++){
		scanf("%d ",a[i]);
	}
	sort(a,a+N);
	if(a[2]<(a[0]+a[1])){
		printf("YES");
		count++;
	}
	else{
		printf("NO");
		count++;
	}
	}
	return 0;
	}

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

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

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

void judgement(int a,int b,int c) {
	if (a == b && b == c || a <= 0 || b <= 0 || c <= 0) {
		cout << "NO" << endl;
		return;
	}
	else if ((a*a) == (b*b) + (c*c) || (b*b) == (a*a) + (c*c) || (c*c) == (a*a) + (b*b)) {
		cout << "YES" << endl;
		return;
	}
	else {
		cout << "NO" << endl;
		return;
	}
}

int main() {
	unsigned int n;//dataset

	cin >> n;

	vector<int> vector_a;
	vector<int> vector_b;
	vector<int> vector_c;

	for (int i = 0; i < n; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;
		vector_a.push_back(a);
		vector_b.push_back(b);
		vector_c.push_back(c);
	}

	for (int i = 0; i < n; i++) {
		judgement(vector_a[i], vector_b[i], vector_c[i]);
	}

	return 0;

}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
using namespace std;
int main(){
    int a,b,c,i;
    cin>>i;
    for(int n=0;n<i;n++){
        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 == b * b + a * a){
            cout<<"YES"<<endl;
        }else{cout<<"NO"<<endl;}
    }
    return 0;
}

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

int main(){
	int a,b,c,d,i;
	cin>>i;
	for(int n=0;<i;n++;){
 		cin>>a>>b>>c;
  		if(a<b){d=a,a=b,b=a;}
   		else if(a<c){d=a,a=c,c=d;}

   		if(a*a==b*b+c*c){cout<<"Yes"<<endl;}
   		else {cout<<"No"<<endl;}
   	}   
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
using namespace std;
int main() {
  int n;
  while(cin >> n) {
    vector<string> ans;
    for (int i = 0; i < n; ++i) {
      int x, y, z;
      cin >> x >> y >> z;
      if (x < y + z && y < z + x && z < x + y) {
        if (x * x == y * y + z * z || y * y == z * z + x * x || z * z == x * x + y * y) {
          ans.push_back("YES");
        }
      } else {
        ans.push_back("NO");
      }
    }
    for (int i = 0; i < n; ++i) {
      cout << ans[i] << endl;
    }
  }
  return 0;
}

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

int main()
{
    int t;
    cin>>t;
    while(t--){
    int a[3];
    for(int i=0;i<3;i++)
        cin>>a[i];
    sort(a,a+3);
    ll ot=(a[0]*a[0])+(a[1]*a[1]);
    if(ot==(a[2]*a[2])) cout<<"YES\n";
    else cout<<"NO\n";
    }
    return 0;
}

C++: #include <stdio.h>

int right(int x, int y, int z);

int main(void)
{
    int n, x, y, z;
    scanf("%d", &n);
    for (int i = 0; i < n; i ++) {
	scanf("%d %d %d", &x, &y, &z);
	if (right(x, y, z) == 1) {
	    printf("YES\n");
	} else {
	    printf("NO\n");
	    break;
	}
    }
    return 0;
}

int right(int x, int y, int z)
{
    if (x * x == y * y + z * z) {
	return 1;
    } else if (y * y ==  x * x + z * z) {
	return 1;
    } else if (z * z == x * x + y * y) {
	return 1;
    } else {
	return 0;
    }
}

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

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

    string Answer [1000];

    for (int x = 0; x <  TestCase ; x++)
        {
            int a;
            int b;
            int c;

            cin >> a >> b >> c;

            if (a*a + b*b == c*c)
            {
                Answer [x] = "YES";
            }
            else
            {
                Answer [x] = "NO";
            }
        }
    for (int y = 0; y < TestCase; y++)
    {
        cout << Answer [y] << endl;
    }


    return 0;
}

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

int main()
{

    int a, b, c;
    int num = 0;

    cin >> num;

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

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

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

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

    }   


    return 0;
}

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

using namespace std;

int main() {
	int N, side[3], i,j;

	cin >> N;

	for (i = 0; i < 3; i++){
		cin >> side[0] >> side[1] >> side[2];
		sort(side, side + 3);

		if (pow(side[0], 2) + pow(side[1], 2) == pow(side[2], 2)){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}	
	}
	return 0;
}

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