Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

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)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

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
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}
func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

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

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

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

C++: //a, b, cツつェツ禿シツ療債つウツづェツつスツづつォツ、ツつサツづ個三ツ陛督づーツ篠敖づつ三ツ角ツ形ツつェツ陳シツ角ツ三ツ角ツ形YESツづーツ、ツつサツつ、ツづづ按つ「ツづ按づァNOツづーツ出ツ療債つケツづヲ
//ツ暗ェツ行ツ姪堋づ可表ツつウツづェツづゥnツ嘉アツ閉ェツ、ツデツーツタツセツッツトツづ債堕カツ催敖つキツづゥ

#include<iostream>
#include<algorithm>
using namespace std;

inline int Squere(int x)
{
	return x*x;
}

int main(void)
{
	const int N = 3;
	int a[N];
	int n;
	int i, j;

	cin >> n;
	for(i = 0; i < n; i++)
	{
		for(j = 0; j < N; j++)
			cin >> a[j];
		sort(a, a+N);
		
		if( Squere(a[0]) + Squere(a[1]) == Squere(a[2]) )
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

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

int main() {
	ios_base::sync_with_stdio( false );

	int n;
	cin >> n;

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

		a *= a;
		b *= b;
		c *= c;

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

C++: #include <iostream>
#include <vector>
#include <cmath>

using namespace std;

void bubbleSort(vector<int> &a)
{
	int tmp;
	for (int i = 0; i < a.size() - 1; i++)
	{
		for (int j = 0; j < a.size() - 1 - i; j++)
		{
			if (a[j] < a[j + 1])
			{
				tmp = a[j + 1];
				a[j + 1] = a[j];
				a[j] = tmp;
			}
		}
	}
}

int main()
{
	int n;
	cin >> n;
	vector< vector<int> > a(n, vector<int>(3, 0));
	for (int i = 0; i < n; i++)
	{
		cin >> a[i][0] >> a[i][1] >> a[i][2];
	}
	for (int i = 0; i < n; i++)
	{
		bubbleSort(a[i]);
		if (pow(a[i][0], 2) == pow(a[i][1], 2) + pow(a[i][2], 2))
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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<algorithm>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j!=n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
    j++;
  }
  return 0;
}

C++: 
inputArray = Array.new
rows = gets.to_i
i = 0
rows.times do
  temp = gets
  inputArray[i], inputArray[i+1], inputArray[i+2] = temp.split(" ").map(&:to_i)
  i += 3
end
i = 0
inputArray.map!{|n| n ** 2}
rows.times do
  if inputArray[i] + inputArray[i+1] == inputArray[i+2]
    puts "YES"
  else
    puts "NO"
  end
end

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
typedef pair<P,P> PP;
const ll MOD=10000;
const ll INF=1000000000;
const int MAX=100001;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
    int a,b,c,n;
    cin>>n;
    while(n){
        int a2=a*a;int b2=b*b;int c2=c*c;
        if(a2==b2+c2||b2==a2+c2||c2==a2+b2){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
        n--;
    }
    return 0;
}

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

using namespace std;

int main() {
        int t, a, b, c;
        cin>>t;
        for(int i; i<t; i++) {
                cin>>a>>b>>c;
                if(pow(a, 2)+pow(b, 2)==pow(c, 2)) cout << "YES" << endl;
                else cout << "NO" << endl;
        }
        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){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void){
    int n;
    vector<int> a(3);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[0]>>a[1]>>a[2];
        sort(a.begin(),a.end());
        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])cout<<"YES"<<endl;
        else cout<<"NO"<<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;
    bool flag;

    cin>>a>>b>>c;

    flag = a*a ==  b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b;

    cout<<(flag ? "YES" : "NO")<<endl;
  }
}

C++: #include<iostream>
int main(){return 0;}

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

void swap(int *,int *);

int main(void)
{
	int a,b,c;
	int i,n;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d %d",&a,&b,&c);
		if(b<a)swap(&a,&b);
		if(c<b)swap(&b,&c);
		if(b<a)swap(&a,&b);
		if( (((int)((double)(a)/3.0*4.0))==b) && (((int)((double)(a)/3.0*5.0))==c)) printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

void swap(int *a,int *b){
	int work;
	work=*a;
	*a=*b;
	*b=work;
}

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

using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, a[3];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[0] >> a[1] >> a[2];
    sort(a, a + 3);
    puts(a[0] * a[0] + a[1] * a[1] == a[2] * a[2] ? "YES" : "NO");
  }
  return 0;
}

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

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

#define add push_back
#define inf 2147000000

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main(void){
	int a,b;
	
	while(scanf("%d",&a)!=EOF){
	scanf("%d",&b);
	a+=b;
	int i=0;
	for(i=0;a>=10;i++){
		a-=a%10;
		a/=10;
	}
	
	if(a==0){
		cout<<0<<endl;
	}else{
	cout<<i+1<<endl;
	}
	}
}

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

using namespace std;

int main(){
	int n;

	cin >> n;
	
	for(int i = 0; i < n; i++){
		int tate,yoko,naname;
		cin >> tate >> yoko >> naname;

		if(tate > naname){
			swap(tate,naname);
		}
		if(yoko > naname){
			swap(yoko,naname);
	}

		if(naname * naname == tate * tate + yoko * yoko)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}