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>
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 <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main() {
    int N;
    cin >> N;
    int a[3];
    REP(i,N){
        cin >> a[0] >> a[1] >> a[2];
        sort(a,a+3);
        if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])
            cout << "YES" << '\n';
        else
            cout << "NO" << '\n';
    }
        

}

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

using namespace std;

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

C++: #include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(){
    int a , b;
    while( cin >> a >> b ){
        stringstream ss;
        ss << a+b ;
        string str = ss.str();
        cout << str.size() << endl;
    }
}

C++: #include <iostream>

using namespace std;

int main() {

	int dataNum;
	int hen[1000][3];

	cin >> dataNum;
	for (int i = 0; i < dataNum; i++) {
		cin >> hen[i][0] >> hen[i][1] >> hen[i][2];
	}

	for (int i = 0; i < dataNum; i++) {
		//cout << "for i datanum=" <<dataNum << endl;
		//????????????????????§?????????
		for (int j = 3 - 1; j >0; j--) {
			//cout << "for j" << endl;
			for (int k = 0; k < j; k++) {
				//cout << hen[i][k] << "," << hen[i][k + 1] << endl;
				if (hen[i][k] > hen[i][k + 1]) {
					//cout << "swap" <<endl;
					int dummy = hen[i][k];
					hen[i][k] = hen[i][k + 1];
					hen[i][k + 1] = dummy;
				}
			}
		}

		//??´?§?????????§??????
		if (hen[i][0] * hen[i][0] + hen[i][1] * hen[i][1] == hen[i][2] * hen[i][2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO"  << endl;
		}
	}

	return 0;
}

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

int Max(int i[3]){
	int max=0,pos;
	for(int n=0;n<3;n++){
		if(max<i[n]){
			max=i[n];
			pos=n;
		}
	}
	return pos;

}

int main(){
	int N;
	cin >> N;
	while(N--){
		int i[3],c;
		int max;
		cin >> i[0] >> i[1] >> i[2];
		max = Max(i);
		c = i[max];
		i[max]=0;
		if(i[0]*i[0]+i[1]*i[1]+i[2]*i[2] == c*c)
			cout<<"YES\n";
		else
			cout<<"NO\n";
	}
}

C++: /*
AIZU ONLINE 0003

Is it a Right Triangle?
*/

#include <stdio.h>

main()
{
	int cnt;
	int a,b,c;
	int	i;

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


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

	}
	return(0);
}

C++: #include<iostream>
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(a*a+c*c==b*b){
            cout<<"YES"<<endl;
        }
        else if(c*c+b*b==a*a){
            cout<<"YES"<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
    
    return 0;
}

C++: #include <cstdio>
#include <algorithm>
#define LOOP(index,times) for(int index=0;index<times;index++)
using namespace std;

int main(){

int N;
scanf("%d",&N);

int l[3];

LOOP(i,N){

scanf("%d %d %d",&l[0],&l[1],&l[2]);
sort(l,l+3);

if(l[0]*l[0]+l[1]*l[1]==l[2]*l[2])
	printf("YES\n");
else
	printf("NO\n");		

}
return 0;		
}

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

C++: #include<stdio.h>
int main(){int n,a,b,c;scanf("%d",&n);while(n--){scanf("%d %d %d",&a,&b,&c);a*=a;b*=b;c*=c;printf("%s\n",a+b==c||b+c==a||c+a==b?"YES":"NO");}return 0;}

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

C++: #include<stdio.h>
int main(void){
	int i,N;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		int j,a[3]={},b[3]={};
		for(j=0;j<3;j++){
			scanf("%d",&a[j]);
			}
		b[0]=a[0];
		if(a[0]<a[1]){
			b[1]=a[0];
			b[0]=a[1];
		}b[1]=a[1];
		if(b[0]<a[2]){
			b[2]=b[1];
			b[1]=b[0];
			b[0]=a[2];
		}else if(b[1]<a[2]&&a[2]<b[0]){
			b[2]=b[1];
			b[1]=a[2];
		}else b[2]=a[2];
		
		printf("%d %d %d",b[0],b[1],b[2]);
		if(b[0]*b[0]==b[1]*b[1]+b[2]*b[2])
			puts("YES");
		else puts("NO");
	}
	return 0;
}

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

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

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

int main(){

	int input[1000][3], num, i, j, temp;
	
	cin >> num;
	
	for(i = 0; i < num; i++){
	
		cin >> input[i][0] >> input[i][1] >> input[i][2];
		
		if(input[i][0] < input[i][1]){
			temp = input[i][0];
			input[i][0] = input[i][1];
			input[i][1] = temp;
			}

		if(input[i][0] < input[i][2]){
			temp = input[i][0];
			input[i][0] = input[i][2];
			input[i][2] = temp;
			}
		
		if(input[i][0] * input[i][0] == input[i][1] * input[i][1] + input[i][2] * input[i][2])
			cout << "YES" << endl;
		
		else cout << "NO" << endl;
	}
	
	return 0;
}

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

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

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

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

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

int main(){
	int n, a, b, c, x, y, z;
	
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a >> b >> c;
		int sum = a + b + c;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if((y*y) + (z*z) == (x*x))
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
	
    return 0;
}