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 <algorithm>

using namespace std;

int main()
{
    int num, h, l, r;
    int line[3];

    cin >> num;

    for (int n = 0; n < num; n++)
    {
        cin >> line[0] >> line[1] >> line[2];

//        cout << "input:" << line[0] << " " << line[1] << " " << line[2] << endl;

        h = 0;
        l = 0;
        r = 0;

        h = *max_element(line, line + num);
//        cout << "max:" << h << endl;

        for (int i = 0; i < 3; i++)
        {
            if (line[i] == h && l == 0)
            {
                l = line[i] * line[i];
            }
            else
            {
                r += line[i] * line[i];
            }
        }

//        cout << "left:" << l << endl;
//        cout << "right:" << r << endl;

        if (l == r)
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }

    return 0;
}

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

int main () {
    int n,i;
    float a,b,c;
    for(i=0;i<n;i++){
        cin >> a >> b >> c;
        if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "YES" << endl;
        else cout << " NO" << endl;
    }
}

C++: #include<stdio.h>

int main(void)
{
	int i;
	int x[1000]={0},y[1000]={0},z[1000]={0},hantei[1000]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<=0 || 1000<x[j] || y[j]<=0 || 1000<y[j] || z[j]<=0 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	   
	switch(hantei[i])
	    {
		   case 0:
			  printf("NO\n");
			  break;
		   case 1:
			  printf("Yes\n");
		      break;
	   }
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

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

    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 a,b,c,n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a>>b>>c;
        if(a*a==c*c+b*b||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 <vector>
#include <algorithm>
using namespace std;

int main(){
    int n; cin >> n;
    vector<int>a(3);
    
    for(int i=0; i<n; i++){

        for(int j=0; j<3; j++){
            cin >> a[j];
        }

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

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

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

void judge(int x, int y, int z, bool flag)
{    
    if (x * x + y * y == z * z){
        flag = true;
    }  
}


int main(void)
{
    int repeat, a, b, c;
    bool flag = false;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        judge (a, b, c, flag); 
        judge (b, c, a, flag);
        judge (c, a, b, flag);
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

C++: #include <iostream>

bool judgement(int a, int b, int c)
{
	if (a*a == b*b + c*c) {
		return true;
	} else {
		return false;
	}
}

int main()
{
	while (true) {
	    static int x;
	    static int y;
	    static int z;
	    static bool flag[3];
	    std::cin >> x >> y >> z;
	    flag[0] = judgement(x, y, z);
	    flag[1] = judgement(y, z, x);
	    flag[2] = judgement(z, x, y);
	    if (flag[0] || flag[1] || flag[2]) {
	    	std::cout << "YES" << std::endl;
	    	} else {
	    		std::cout << "NO" << std::endl;
	    		}
           break;
	   }
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main() {
	int i, j, l;
	int aa, ab,ac,ad,ae,af,ag;
	double ba, bb, bc;
	char ca, cb, cc;
////////////////////////////////////////////////////////
	int max;
	cin >> ag;
	for (i = 0; i < ag; i++) {
		cin >> aa;
		cin >> ab;
		cin >> ac;
		if (aa < ab) {
			max = aa;
			aa = ab;
			ab = max;
		}
		if (aa < ac) {
			max = aa;
			aa = ac;
			ac = max;
		}
		if (ab * ab + ac * ac == aa * aa) {
			cout << "YES\n";
		}
		else {
			cout << "NO\n";
		}

	}


}

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

C++: #include <iostream>
using namespace std;
 
int main(){
    int n,a,b,c;
    cin>>n;
    while(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 <stdio.h>

int main(void)
{
	int i,k;
	int sort[3];
	int num;
	int max,mid,min;
	int d=1,n=3;
	num<=1000;
	1<=sort[3]<=1000;
	
	
	scanf("%d",&num);
	
	
    while(d<=num){
		scanf("%d %d %d",&sort[0],&sort[1],&sort[2]);
		for(n=3;n<=1;n--){
			for(i=0;i<=n-1;i++){
				if(sort[i]>sort[i+1]){
						k=sort[i];
						sort[i]=sort[i+1];
						sort[i+1]=k;
					}
			}
		}
		max=sort[2];
		mid=sort[1];
		min=sort[0];
		if(max*max==mid*mid+min*min){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		d++;
	}
	return 0;
}

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

int main() {
  int n;
  int a, b, c;
  int *s1, *s2, *l;
  cin >> n;
  while (n--) {
    cin >> a >> b >> c;
    if (a>=b && a>=c) {
      l = &a;
      s1 = &b;
      s2 = &c;
    } else if (b >= c) {
      l = &b;
      s1 = &a;
      s2 = &c;
    } else {
      l = &c;
      s1 = &a;
      s2 = &b;
    }
    cout << (((*l)*(*l)==(*s1)*(*s1)+(*s2)*(*s2)) ? "YES" : "NO") << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
int main()
{
  int n;
  std::cin >> n;
  while (n--) {
    int a[3];
    std::cin >> a[0] >> a[1] >> a[2];
    std::sort(a, a + 3);
    if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) std::cout << "YES" << std::endl;
    else std::cout << "NO" << std::endl;
  }
  return 0;
}

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

int main(){
    int n;
    cin >> n;
    int a,b,c;
    while(cin >> a >> b >> c){
        //cout << a << b << c << endl;
        if(pow(a,2.0)+pow(b,2.0)==pow(c,2.0)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}