Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define F first
#define S second
#define pb(x) push_back(x)
#define mp(a,b) make_pair(a,b)
#define sz size()
#define all(A)    A.begin(), A.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define f0(i,b)   for(int i=0;i<(b);i++)
#define f1(i,b)   for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define mod 1000000007

#define forr(i,n)    for(i=0; i<n; i++)
#define whilee(i,t)  while(i!=t)
#define  sl(a)  scanf("%lld",&a)
#define  pl(a)  printf("%lld",a)

//for(auto it =A.begin(); it!=A.end(); it++)
//sort(A.begin(),A.end());
//binary_search(A.begin(),A.end(),x);
//reverse(A.begin(), A.end());
//cout << *max_element(A.begin(), A.end());
//cout << *min_element(A.begin(), A.end());
//count(A.begin(), A.end(), X); //counts the occurrences of X
//distance(A.begin(),A.end());  //distance between first to last element
//accumulate(A.begin(), A.end(), 0); //add
//next_permutation(A.begin(), A.end());
//prev_permutation(A.begin(), A.end());
//swap(S[0], T[0]);
//scanf("%d",&x);
//printf("%d\n",x);

//vector <int> A;
//deque <int> A;
//queue <int> A;
//stack <int> A;
//set <int> A;
//map <int,int> A;
//pair <int,int> A ;
//vector <pair <int,int>> A ;
//char ch;
string S, T, U;
ll i, j, k, a, b, c, d, f, g, h, l, m, n, p, q, r, s, t, w, x, y, z, maxx=INT_MIN, minn=INT_MAX, ans=0, sum=0, cnt=0;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    cin>>t;
    int A[3];
    forr(i,t)
    {
        cin>>A[0]>>A[1]>>A[2];
        sort(A,A+3);
        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 a,b,c;
  int n;
  cin >> n;
  while(n--){
    cin >> a >> b >> c;
    if(a*a == b*b + c*c ||
       c*c == a*a + b*b||
       b*b == c*c + a*a)cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}

C++: #include <iostream>
#include <algorithm>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
int main() {
	int a[3], n;
	cin >> n;
	rep(i,n) {
		rep(j,3) {
			cin >> a[j];
		}
		sort(a, a + 3);
		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>
#include <cstdio>
#define NMAX (1000)
using namespace std;
int main(void){
    
    int N = 0;
    int a=0;
    int b=0;
    int c=0;
    char* Result[NMAX];

    //N??°?????\???
    scanf("%d",&N);
    
    //N?????°???????????????a,b,c???????????????
    for(int Ncount = 0; Ncount < N; Ncount++){
        scanf("%d %d %d",&a,&b,&c);
        if( (( (a^2) + (b^2) ) == (c^2)) ){
            Result[Ncount] = "Yes";
        }else{
            Result[Ncount] = "NO";
        }
    }
    
    //??????????????????????????¨???Yes or No?????????
    for(int Ncount=0;Ncount < N;Ncount++){
        printf("%s\n",Result[Ncount]);
    }
    
}

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

using namespace std;

int main()
{
    int n;
    cin >> n;
    while(n-- > 0) {
        vector<int> edge;
        for(int i = 0; i < 3; i++) {
            int e;
            cin >> e;
            edge.push_back(e);
        }
        sort(edge.begin(), edge.end(), greater<int>());
        if((edge[0] * edge[0]) == (edge[1] * edge[1] + edge[2] * edge[2])) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
}

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



int main()
{
    int a,b,c,t,h;
    cin>>t;
    while(t--)
    {
        cin>>a>>b>>c;
        if(a*a==b*b+c*c || b*b==c*c+a*a || c*c==a*a+b*b) cout << "YES\n";
        else cout << "NO\n";
    }
    return 0;
}

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

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

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

#define ll long long

using namespace std;

int mian()
{
    ll T,t,num,a,b,c,A,B,C;
    cin>>T;
    for( t=1; t<=T; t++)
    {
        cin>>a>>b>>c;
        A=(ll)pow(a,2);
        B=(ll)pow(b,2);
        C=(ll)pow(c,2);
        if( ((a+b)>c) && ((b+c)>a) && ((c+a)>b))
            printf("NO\n");
        else if( (A+B)==C )
            printf("YES\n");
        else if((B+C)== A)
            printf("YES\n");
        else if((A+C) == B)
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
}

C++: #include<stdio.h>
#include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include<math.h>
#include <algorithm>
using namespace std;



int main(void)
{
  double a,b,c,d;
  double Max,Min,ans;
  vector<int> array;
  int i=0;
  while(1)
    {
	cin>>a>>b>>c;
	 if(!cin)break;
	 Max=max(a,b);
	 Max=max(Max,c);
	 Min=min(a,b);
	 Min=min(Min,c);
     Max=pow(Max,2.0);
     Min=pow(Min,2.0);
    ans=sqrt((Max-Min));
    if(ans==a||ans==b||ans==c)array.push_back(0);	
    else array.push_back(1);
    }

  while(i<array.size())
    {
	d=array[i];
	if(!d) cout<<"YES"<<endl;
	else cout<<"NO"<<endl;	
  i++;
    }
  array.clear();
}

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

C++: #include <stdio.h>

char divide(int math, int english, int japanese);
char class;

int main(void)
{
    int dataset;
    int math, english, japanese;

    while (1){
        scanf("%d", &dataset);
        if (dataset == 0){
            break;
        } else {
            while (dataset--){
                scanf("%d %d %d", &math, &english, &japanese);
                class = divide(math, english, japanese);
                printf("%c\n", class);
            }
        }
    }

    return 0;
}

char divide(int math, int english, int japanese)
{
    int sum = math + english + japanese;

    if (math == 100 || english == 100 || japanese == 100){
        class = 'A';
    } else if (math + english >= 90 * 2){
        class = 'A';
    } else if (sum >= 80 * 3){
        class = 'A';
    } else if (sum >= 70 * 3){
        class = 'B';
    } else if (sum >= 50 * 3 && (math >= 80 || english >= 80)){
        class = 'B';
    } else {
        class = 'C';
    }

    return class;
}