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>
using namespace std;
int main()
{
	int a = 0;
	int kazu = 0;
	int b = 0;
	int c = 0;
	for (int i = 0; i < kazu; i++)
	{
		cin >> a;
		cin >> b;
		cin >> 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 <stdlib.h>
#include <math.h>

#include <iostream>

int compare_int(const void* a, const void* b) {
    return * (int*) a - * (int*) b;
}

int ni(int tg) {
	return pow((double) tg, 2);
}

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

	for (int i = 1; i <= n; i++) {
		const int size = 3;
		int in[size];
		std::cin >> in[0] >> in[1] >> in[2];

		qsort(in, size, sizeof(int), compare_int);

		if (ni(in[0]) + ni(in[1]) == ni(in[2]))
			std::cout << "YES" << std::endl;
		else
			std::cout << "NO" << std::endl;
	}
}

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

C++: #include <bits/stdc++.h>

using namespace std;
int s[4];
int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
	cin>>s[1]>>s[2]>>s[3];
	sort(s+1,s+4);
	int a= (s[1]*s[1])+(s[2]*s[2]);
	if(s[3]*s[3]==a)
	{cout<<"YES"<<endl;}
	else {
		cout<<"NO"<<endl;
	}
}
}

C++: #include <stdio.h>

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

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

C++: #include<iostream>

using namespace std;

int main(void)
{
	int a,b,c;
	cin>>a;
	while(cin>>a>>b>>c){
		int x,y,z; x=b; y=c; z=a;
		if(z<b) z=b; x=a; y=c;
		if(z<c) z=c; x=a; y=b;
		if(x*x+y*y==z*z){
			cout<<"YES";
		}else{
			cout<<"NO";
		}
	}
}

C++: #include<stdio.h>
int main(){
	int N,x,y,z,i;
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d %d %d",&x,&y,&z);
		x = x^2;
		y = y^2;
		z = z^2;
		if(x>y&&x>z){
			if(x==(z+y))printf("YES\n");
			else printf("NO\n");
		}
		else if(y>z&&y>x){
			if(y==(x+z)) printf("YES\n");
			else printf("NO\n");
		}
		else {
			if(z==(x+y))printf("YES\n");
			else printf("NO\n");
		}
	}
	return 0;
}

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

int main() {
	int n, t[3], a, b, c=0;
	cin >> n;
	for(int m=0; m<n; m++){
	for(int i=0; i<3; i++){
		cin >> t[i];
	}
	for(int j=0; j<3; j++){
		int v = t[j];
		int k = j-1;
		while(t[k]<v && k>=0){
			t[k+1] = t[k];
			k--;
			t[k+1] = v;
		}
	}
	if(t[0]*t[0] == t[1]*t[1]+t[2]*t[2])
		cout << "YES" << endl;
	else cout << "NO" << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <cstdio>

using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;(i)>=0;(i)--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;

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

C++: #include<iostream>

using namespace std;

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

  if(a>c){
    tmp=a;
    a=c;
    c=tmp;
  }
  if(b>c){
    tmp=b;
    b=c;
    c=tmp;
  }

  if(a*a+b*b==c*c)
    cin >> YES >> endl;
  else
    cin >> NO >> endl;
  return 0;
}

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

C++: #include <iostream>

using namespace std;


//辺の長さが、a,b,cも時、三角形ができるかどうかを判定。できる場合はYESを返し、できない場合はNOを返す。
void judge_triangle(int a,int b,int c){
  int max = 0;
  bool flag = false;


  if( a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a == b*b){
    flag = true;
  }

  if(flag == true){
    cout <<"YES\n";
  }else {
    cout <<"NO\n";
  }

}

int main(){
  int data_length;
  int sides_length[] ={ -1,-1,-1};
  int i,j;

  cin >> data_length;

  for(i = 0;i < data_length;i++){
    for(j = 0;j<3;j++){
      cin >> sides_length[j];
      if(j==2){
        judge_triangle(sides_length[0],sides_length[1],sides_length[2]);
      }
    }
  }

  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){swap(a,b);}
		if(b>c){swap(b,c);}
		if(a>b){swap(a,b);}
		if(a*a+b*b==c*c){
			cout<<"YES"<<endl;
		}
		else {
			cout<<"NO"<<endl;
		}

	}
return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
   int a,b,c,x, y, z,n;
 
   // read in n 
   cin>>n;

   // for n set of data, read into 3 sides 
   
   for(int i=1;i<=n;i++)
   {
      cin>>a>>b>>c;          
      x=a*a; y=b*b; z=c*c;
      
      // check if they are triangle
      if(x+y==z||x+z==y||y+z==x)
          cout<<"YES"<<endl;
      else
          cout<<"NO"<<endl;
    }   
    return 0;
}

C++: #include <stdio.h>

int main(){
    int N;
    int a,b,c,d;
    int i;
    scanf("%d",&N);
    for(i=0;i<N;i++){
        scanf("%d %d %d",&a,&b,&c);
        if(a<b){
            d = a;
            a = b;
            b = d;
        }
        if(a<c){
            d = a;
            a = c;
            c = d;
        }
        printf((a*a-b*b-c*c) ? "NO\n" : "YES\n");
    }
}