Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"sort"
	"strconv"
	"strings"
)

var (
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	for i := 0; i < n; i++ {
		sc.Scan()
		edges := make([]int, 3, 3)
		cols := sort.StringSlice(strings.Split(sc.Text(), " "))
		cols.Sort()
		for i, c := range cols {
			edges[i], _ = strconv.Atoi(c)
			edges[i] = int(math.Pow(float64(edges[i]), 2))
		}
		msg := "NO"
		if edges[2] == edges[0]+edges[1] {
			msg = "YES"
		}
		fmt.Println(msg)
	}
}

C++: /*
	input: データセット数, データセット(3つずつ)
	output:yes || no
*/

#include<iostream>
using namespace std;

int main(){
	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 || b==a+c || c==a+b){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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>
#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%d",&a,&b)){
	
	a+=b;
	int i=0;
	for(i=0;a>=10;i++){
		a/=10;
	}
	
	cout<<i+1<<endl;
	}
}

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

return 0;
}

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

int main() {
	int i, a[3];
	cin >> i;

	bool ans[i];
	for (int j = 0; i > j; j++) {
		cin >> a[0] >> a[1] >> a[2];

		sort(a,a+3);

		if(a[0]*a[0] + a[1] * a[1] == a[2] * a[2]) ans[j] = true;
		else                                       ans[j] = false;
	}

	for(int j = 0; i > j; j++) {
		if(ans[j] == true) cout<<"Yes"<<endl;
		else               cout<<"No"<<endl;
	}
	return 0;
}

C++: #include<iostream>

short a, b, c;
bool flag;

int main()
{
	while(std::cin>>a>>b>>c)
	{
		flag = false;
		if(a^2+b^2==c^2)
		{
			flag = true;
		}
		else if(a^2+c^2==b^2)
		{
			flag = true;
		}
		else if(b^2+c^2==a^2)
		{
			flag = true;
		}
		if(flag = true)
		{
			printf("YES");
		}
		else
		{
			printf("NO");
		}
	}
	return 0;
}

C++: #include<bits//stdc++.h>
using namespace std;
int main(){
    int n,a[3];cin >> n;
    while(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"<<endl;
        else cout << "NO"<<endl;
    }
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
  int a,b,c;
  int N = 10;
  //vector<int> v;
  //while (cin >> a >> b >> c){
  //v.push_back(a,b,c);
  //  }
  //int x = a + b;
  //int y = b + c;
  //int z = c + a;
  //if (x => c || y => a || z => b){
  //cout << "NO" << endl;
  //} else if(x < c || y < a || z < b){
  //cout << "YES" << endl;
  //}
  while(N>0){
    cin >> a;
    cin >> b;
    cin >> c;
    int x = a + b;
    int y = b + c;
    int z = c + a;
    if (x <= c || y <= a || z <= b){
      cout << "NO" << endl; 
      N = N - 1;  
    }else if(x > c || y > a || z > b){
      cout << "YES" << endl;
      N = N - 1;
    }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, n1, n2, n3;
	int i = 1;
	cin >> n;
	do{
		cin >> n1 >> n2 >> n3;
		
		if(n1 * n1 + n2 * n2 == n3 * n3)
		cout << "YES" << endl;
		else 
		cout << "NO" << endl;
		i++;
	}while(i <= n);
	
	return 0;
}

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

using namespace std;

int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    array<int, 3> a;
    for (int& i : a) cin >> i;
    sort(a.begin(), a.end());
    if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}

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

int main(){
    int a,b,c,i;
	for(int j=0;j<1000;j++){
		if(!(cin >> a >> b >> c))break;
		a = a*a;
		b = b*b;
		c = c*c;
		if(a==b+c || b==a+c || c==a+b)cout << "YES" << endl;
		else cout << "NO" << endl;
	}

    
    return 0;
}

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

bool ans[1000];

bool judge(int a,int b,int c) {
	if (pow(c,2)==(pow(a,2)+pow(b,2))) {
		return true;
	}
	return false;
}

int main() {
	int N,aside[3];
	scanf("%d",&N);
	for(int i=0;i<N;++i) {
		scanf("%d %d %d",&aside[0],&aside[1],&aside[2]);
		sort(aside,aside+3);
		if(judge(aside[0],aside[1],aside[2])) { ans[i]=true; }
		else { ans[i]=false; }
	}
	for(int i=0;i<N;++i) { 
		if(ans[i]) { puts("YES"); }
		else { puts("NO"); }
	}
	return 0;
}

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

int main(void){
	int n;
	cin >> n;
	for(int i=0; i<n; i++){
		int a[3];
		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<iostream>

int main(){
	int a,b,c;
	std::cin>>a>>b>>c;
	if(a*a+b*b==c*c){
		std::cout<<"YES"<<std::endl;
	}
	else if(a*a+c*c==b*b){
		std::cout<<"YES"<<std::endl;
	}
	else if(b*b+c*c==a*a){
		std::cout<<"YES"<<std::endl;
	}
	else std::cout<<"NO"<<std::endl;

	return 0;
}

C++: #include<stdio.h>

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

C++: #include<bits/stdc++.h>
using namespace std;
int n;
int main(){
    cin>>n;int a[3]={0};
    for(int i=0;i<n;i++){
        cin>>a[0]>>a[1]>>a[2];
        sort(a,a+3);
        cout<<((a[2]*a[2])==(a[1]*a[1]+a[0]*a[0])?"YES":"NO")<<endl;
    }
}

C++: #include <iostream>
#include <math.h>
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*a + b*b == c*c || a*a + c*c == b*b || c*c + b*b == a*a)
			cout << "YES\n";
		else
			cout << "NO\n";
	}
	return 0;
}

C++: def main():
    n = int(input())
    for i in range(n):
        a, b, c=(int(x) for x in input().split())
        if a+b<=c or a+c<=b or b+c<=a:
            print("NO")
        else:
            print("YES")

main()

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){

	int num,i,j;
	
	cout << "the number of data set: ";
	cin >> num;
	
	int a[num],b[num],c[num];
	
	for(i=0;i<num;i++){
		cin >> a[i] >> b[i] >> c[i];
	}
	
	int t[3];
	for(i=0;i<num;i++){
		t[0] = a[i];
		t[1] = b[i];
		t[2] = c[i];
		
		int max,str;
		str = 1;
		while(str<num){
			max = t[0];
			for(j=str;j<3;j++){
				if(max<t[j]){
					swap(t[str-1],t[j]);
				}
			}
			str++;
		}
		if(t[0]*t[0]==t[1]*t[1]+t[2]*t[2])
			cout << "YES\n";
		else cout << "NO\n";
	}
	
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(){
  using namespace std;
  int N;
  cin >> N;
  for(int i = 0; i < N; i++){
    vector<int> edge(3);
    for(int j = 0; j < 3; j++){
      cin >> edge[j];
    }
    sort(edge.begin(), edge.end());
    int l,m,s;
    s = edge[0];
    m = edge[1];
    l = edge[2];
    if(l*l == m*m + s*s){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
  }
}