Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

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;
}