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"
	} else {
		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++: //
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

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

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n;
    cin >> n;
    
    long t[n][3];
    for(int i = 0; i < n; i++){
        cin >> t[i][0] >> t[i][1] >> t[i][2];
        sort(t[i], t[i] + 3);
    }
    for (int i = 0; i < n; i ++) {
        //printf("(%ld, %ld, %ld)", t[i][0], t[i][1], t[i][2]);
        if(pow(t[i][0], 2) + pow(t[i][1], 2) == pow(t[i][2], 2)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

C++: #include<iostream>
#include<cmath>
int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int a, b, c;
		cin >> a >> b >> c;
		int x, y, z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = (a+b+c) - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
			
}

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

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(),v.end()
using namespace std;
int main(){
  vector<int> a(3,0);
  int n;
  cin>>n;
  vector<int> ans(n,0);
  rep(i,n){
    cin>>a[0]>>a[1]>>a[2];
    sort(all(a));
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0])ans[i]++;
  }
  rep(i,n){
    if(ans[i]!=0)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
  }
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
inline int mulpli(int a,int b,int c){
  using std::cout;
  using std::endl;
  if(a*a==b*b+c*c){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
}
int main(){
  int n,a,b,c;
  using std::cin;
  cin>>n;
  while(n){
    cin>>a>>b>>c;
    if(a==b&&a==c)mulpli(a,b,c);
    if(a>b&&a>c)mulpli(a,b,c);
    if(b>a&&b>c)mulpli(b,a,c);
    if(c>a&&c>b)mulpli(c,a,b);
    n--;
  }
  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 <iostream>
int main(){
	using namespace std;
	int num;
	cin >> num;
	for(int i=0;i<num;i++){
		int a,b,c;
		cin >> a >> b >> c;
		if((a*a)+(b*b)==(c*c)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
}

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

bool check(int a,int b,int c){
	if(a*a==(b*b+c*c)) return true;
	else return false;
}

int main(void){
	int a,b,c;
	int N;
	int i;

	cin >> N;

	for(i=0;i<N;i++){
		cin >> a >> b >> c;
		if(check(a,b,c)||check(b,a,c)||check(c,a,b)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

char const *answer(int a,int b,int c){
	if(c*c == (a*a+b*b))	return "YES";
	else		return "NO";
}

int swap(int x,int y){
	int temp = x;
	x = y;
	y = temp;
}

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);
	cout << answer(a,b,c) << endl;
	}
}

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[3];
	int n;
	scanf("%d",&n);
	rep(q,n){
		scanf("%d%d%d",&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\n";
		}else{
			cout<<"NO\n";
		}
	}
}

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003&lang=jp*/

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    int n;

    cin>>n;
    for (int i = 0; i < n; ++i) {
        vector<int> lens;
        for (int j = 0; j < 3; ++j) {
            int tmp;
            cin>>tmp;
            lens.push_back(tmp);
        }
        sort(lens.begin(),lens.end(),greater<int>());
        if(pow(lens[0],2)==pow(lens[1],2)+pow(lens[2],2)){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}

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

using namespace std;

int main(){
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		int a, b, c, sum;
		cin >> a >> b >> c;
		int x, y ,z;
		x = max(a,max(b,c));
		y = min(a,min(b,c));
		z = sum - x - y;
		
		if(x*x == y*y + z*z)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;
	}
}

C++: #include <iostream>

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c));
	int sum = a+b+c-max_num;
	if (max_num < sum) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

int main() {
	int num, a, b, c;
	cin >> num;
	for (int i=0; i<num; i++) {
		cin >> a >> b >> c;
		solve(a,b,c);
	}
	return 0;
}

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

int main()
{
        using namespace std;
        deque<int> edge;
        int iedge[3];
        int j;
        int a,b,c;

        cin >> j;

        for(int l=0;l<j;l++){
                for(int i=0;i<3;i++){
                        cin >> iedge[i];
                edge.push_back(iedge[i]);
                }

                sort(edge.begin(),edge.end());
                a = edge[0];
                b = edge[1];
                c = edge[2];
                if(c*c == (a*a+b*b))cout << "YES\n";
                else cout << "NO\n";

        }

        return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<string>
#include<queue>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<fstream>
#include<sstream>
using namespace std;
vector<long>trn;
int main()
{
    long test,i,a,b,c;

      cin>>test;
     for(i=0;i<test;i++)
     {
         cin>>a>>b>>c;
         trn.push_back(a);
         trn.push_back(b);
         trn.push_back(c);
         sort(trn.begin(),trn.end());

          if(trn[0]*trn[0]+trn[1]*trn[1]==trn[2]*trn[2])
            cout<<"YES"<<endl;
          else
            cout<<"NO"<<endl;

          trn.clear();
     }



    return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int a,b,c,n,i;
int main(){
	cin>>n;
	for(i=0;i<n;i++){
	  cin>>a>>b>>c;
	  if(a>b){
		swap(a,b);
	  }
	  if(a>c){
	    swap(a,c);
	  }
	  if(b>c){
	    swap(b,c);
	  }
	  if(c*c==a*a+b*b){
		   cout<<"Yes"<<endl;
	  }
	  else{
		  cout<<"No"<<endl;
	  }
    }
}