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

using namespace std;

int main(void)
{
  int a,b,c,n;
  vector<int> triangle;

  cin >> n;
  
  for(int i=0;i<n;i++){

    cin >> a >> b >> c;
    
    triangle.push_back(a);
    triangle.push_back(b);
    triangle.push_back(c);

    sort(triangle.begin(),triangle.end(),greater<int> () );

    a=triangle[0];
    b=triangle[1];
    c=triangle[2];

    if(a*a==b*b+c*c)
      cout << "YES" << endl;

    else
      cout << "NO" << endl;

    triangle.clear();

  }

  return 0;
  
}

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

int main(){
  int n;
  int* m;
  int list[1000][3];
  cin>>n;
  for(int i=0;i<n;i++){
  cin>>list[i][0]>>list[i][1]>>list[i][2];
  }
  for(int j=0;j<n;j++){
  sort(list[j],list[j]+3);
  if(list[j][0]*list[j][0]+list[j][1]*list[j][1]==list[j][2]*list[j][2]) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  }
  return 0;
}

C++: #include <stdio.h>

int main(){
	int timel,timei,a,b,c;
	scanf("%d",&timel);
	for(timei=0;timei<timel;timei++){
		scanf("%d %d %d",&a,&b,&c);
		a = a^2;
		b = b^2;
		c = c^2;
		if(a+b==c || b+c==a || c+a==b){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	return 0;
}

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

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

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

int main(void){
	int x[3];
	string n = "NO", y = "YES";
	while(cin >> x[0] >> x[1] >> x[2]){
		sort(x,x + 3);
		if(x[2] <= x[1] + x[0])
			cout << y << endl;
		else
			cout << n << endl;
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
 
using namespace std;
 
int main(void){
  int n,array[3],i,temp;
 
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d%d",&array[0],&array[1],&array[2]);
    sort(array,array+3);
    if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2])  printf("Yes\n");
    else  printf("No\n");
  }
 
  return 0;
}

C++: using System;
using System.Collections.Generic;

namespace TriangleRight
{
	class MainClass
	{
		public static void Main(string[] args) 
		{
			string str; 
			List<string> status = new List<string> ();
			while (!string.IsNullOrEmpty(str = Console.ReadLine())) {
				string[] input = str.Split(' ');
				int a, b, c;
				if (input.Length > 2 && input.Length <= 3) {
					a = input [0].Equals ("") ? 0 : int.Parse (input [0]);
					b = input [1].Equals ("") ? 0 : int.Parse (input [1]);
					c = input [2].Equals ("") ? 0 : int.Parse (input [2]);
				} else {
					a = input [0].Equals ("") ? 0 : int.Parse (input [0]);
					b = 0;
					c = 0;
				}

				if (a + b > c) {
					if (a + c > b) {
						if (b + c > a) {
							status.Add ("YES");
						} else {
							status.Add ("NO");
						}
					} else {
						status.Add ("NO");
					}
				} else {
					status.Add ("NO");
				}
			};

			for (int i = 0; i < status.Count; i++) {
				Console.WriteLine (status[i]);
			}


			Console.Read ();
		}
	}
}

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

int main(){
	int N;
	int i=0;
	int hyp=0,cat=0;
	int x=0;
	
	cin >> N;
	int side[N][3];
	
	while(i<N){
		cin >> side[i][0] >> side[i][1] >> side[i][2];
		if(1<=side[i][0] && side[i][0]<= 1000){
			if(1<=side[i][1] && side[i][1]<= 1000){
				if(1<=side[i][2] && side[i][2]<= 1000)
					i++;
			}
		}
	}
	
	for(int j=0; j<i; j++){
		for(int k=0; k<3; k++){
			x = side[j][k]*side[j][k];
			if(hyp <= x){
				cat += hyp;
				hyp = x;
			}
			else
				cat += x;
		}
		if(hyp == cat)
			cout << "Yes\n";
		else
			cout << "No\n";
		hyp=0;
		cat=0;
	}
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	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 || a*a + c*c == b*b || b*b + c*c == a*a) {
			cout << "Yes" << endl;
		}
		else {
			cout << "No" << endl;
		}
	}
}

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

int main(){
	int n,s=0;
	cin >> n;
	
	while( n>=s ){
		int i=0,k=0,j=0,l=0;
		cin >> i >> k >> j;

		if( i<k ){
			l = i;
			i = k;
			k = l;
		}
		if( i<j ){
			l = i;
			i = j;
			j = l;
		}

		i = i*i;
		j = j*j;
		k = k*k;

		if( i==(j+k) ) cout << "YES" << "\n";
		else cout << "NO" << "\n";
		s++;
	}
}

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

C++: #include <iostream>
#include <string>   
using namespace std;
 
int main(){
	int i;
	cin >> i;
	int a[i][3],b = 0;
	while(b < i){
		cin >> a[b][0] >> a[b][1] >> a[b][2];
		b++;
	}
	b = 0;
	string j = "NO";
	while(b < i){
		if(a[b][0]*a[b][0] + a[b][1]*a[b][1] == a[b][2]*a[b][2]){
			j = "YES";
		}
		if(a[b][0]*a[b][0] + a[b][2]*a[b][2] == a[b][1]*a[b][1]){
			j = "YES";
		}		
		if(a[b][1]*a[b][1] + a[b][2]*a[b][2] == a[b][0]*a[b][0]){
			j = "YES";
		}
	cout << j << endl;	
	b++;	
	}	


}

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

int main() {
  unsigned int n,a,b,c;
  std::cin >> n;
  for(unsigned int i=0;i<n;i++) {
    scanf("%d %d %d", &a, &b, &c); 
    std::vector<unsigned int> v;
    v.push_back(a);
    v.push_back(b);
    v.push_back(c);
    sort(v.begin(),v.end());
    if((v[0]*v[0])+(v[1]*v[1])==(v[2]*v[2])) {
      std::cout << "YES" << std::endl;
    }
    else {
      std::cout << "NO" << std::endl;
    }
  }
}