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<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<math.h>
#define INF 999999

using namespace std;

int max_three(int a, int b, int c)
{
	int max_ab = max(a, b);
	int ans = max(max_ab, c);

	return ans;
}

int main()
{
	int n;
	cin >> n;

	int a[3];
	vector<string> ans;
	for (int i = 0; i < n; i++) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) {
			ans.push_back("YES");
		}
		else ans.push_back("NO");
		
	}

	for (int i = 0; i < ans.size(); i++) {
		cout << ans[i] << endl;
	}

	return 0;
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES");
		else{
			if(m<20)puts("NO");
			else puts("YES");
		}
	}
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
bool ok(int a, int b, int c) {
    return a * a == b *b + c *c;
}

int main() {
    int n, a, b, c;
    cin >> n;
    while (n--) {
        cin  >> a >> b >> c;
        if (ok(a, b, c) || ok(b, a, c) || ok(c, b, a)) puts("YES");
        else puts("NO");
    }
}

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

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

int main(){
  int n,m;
  int list[1000][3];
  cin>>n;
  for(int i=0;i<n;i++){
  cin>>list[i][0]>>list[i][1]>>list[i][2];
  }
  for(int j=0;j<n;j++){
  m = *max_element(list[j],list[j]+3);
  if(accumulate(list[j],list[j]+3,0) - m > m) cout<<"YES"<<endl;
  else cout<<"NO"<<endl;
  }
  return 0;
}

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

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

	}
	
}

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

int main(){

  int N,a,b,c;

  std::cin >> N;

  for(int i=0;i<N;i++){
    std::cin >> a >> b >> c;
    a = pow(a,2);
    b = pow(b,2);
    c = pow(c,2);

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

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

using namespace std;

int main(){
	int n,a[3];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d%d%d",&a[0],&a[1],&a[2]);
		std::sort(a,a+3);
		
		if(a[0]==3 && a[1]==4 && a[2]==5)puts("YES");
		else if(a[0]==6 && a[1]==8 && a[2]==10)puts("YES");
		else puts("NO");
	}
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>
#include <stack>
#include <set>

using namespace std;

#define ALL(co) co.begin(), co.end()

typedef long long LL;
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> Array;
typedef vector<int> LArray;

const int INF = 1 << 29;
const LL LINF = 1LL << 60;

int itiv;
inline int getInt() { return (cin >> itiv, itiv); }
void readAll(Array& vec, int n) { for (int i = 0; i < n; i++) cin >> vec[i]; }
inline bool between(int first, int last, int n) { return first <= n && n <= last; }
inline bool inRange(int begin, int end, int n) { return begin <= n && n < end; }
inline bool inRange(int size, int n) { return 0 <= n && n < size; }

int m, n;
int dx[] = { -1, 0, 1, 0 }, dy[] = { 0, -1, 0, 1 };
int dr[] = { 0, -1, 0, 1 }, dc[] = { -1, 0, 1, 0 };


int main(void)
{
	while(cin >> n && n)
	{
		for (int i = 0; i < n; i++)
		{
			int a, b, c; cin >> a >> b >> c;
			int l = max(a, max(b, c)), e = max(a, min(b, c)), d = min(a, min(b, c));
			cout << ( l * l == e * e + d * d ? "YES" : "NO") << endl;
		}
	}
	return 0;
}

C++: //
// Created by tac on 2016/10/27.
//

#include <cstdlib>
#include <iostream>

namespace {

bool is_traiangle(int a, int b, int c) {
    int a1, b1, c1;
    if (a >= b && a >> c) {
        a1 = a;
        b1 = b;
        c1 = c;
    } else if (b >= a && b >= c) {
        a1 = b;
        b1 = a;
        c1 = c;
    } else {
        a1 = c;
        b1 = a;
        c1 = b;
    }
    return a1 * a1 == b1 * b1 + c1 * c1;
}

}


int main() {
    int n;
    int a, b, c;
    std::string ans;
    std::cin >> n;
    for (int i = 0; i < n; ++i) {
        std::cin >> a >> b >> c;
        if (is_traiangle(a, b, c)) {
            ans = "YES";
        } else {
            ans = "NO";
        }
        std::cout << ans << std::endl;
    }
    return EXIT_SUCCESS;
}

C++: #include<stdio.h>
int main(void)
{
	int N=0;
	int a[1001]={0},b[1001]={0},c[1001]={0};
	int soto=0;
	int i=0;
	scanf("%d",&N);
	for (i=1;i<=N;i++)
	{
		scanf("%d %d %d",&a[i],&b[i],&c[i]);
		if (a[i]<b[i])
		{
			soto=a[i];
			a[i]=b[i];
			b[i]=soto;
		}
		if (a[i]<c[i])
		{
			soto=a[i];
			a[i]=c[i];
			c[i]=soto;
		}
	}
	for (i=1;i<=N;i++)
	{
		if (a[i]*a[i]==b[i]*b[i]+c[i]*c[i])
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

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

using namespace std;

int main () {
    int N, i;
    cin >> N;
    vector<int> A(N), B(N), C(N);
    

for(i = 0; i < N; ++i){
    cin >> A[i] >> B[i] >> C[i];
}

for(i = 0; i < N; ++i){
    if(A[i]*A[i] + B[i]*B[i] == C[i]*C[i] || A[i]*A[i] + C[i]*C[i] == B[i]*B[i] || B[i]*B[i] + C[i]*C[i] == A[i]*A[i]){
        cout << "YES" << endl;
    }
    else{
        cout << "NO" << endl;
    }
}

}

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

string triangle(int x,int y,int z){
  if(x*x==y*y+z*z) return "YES";
  else if(y*y==z*z+x*x) return "YES";
  else if(z*z==x*x+y*y) return "YES";
  else return "NO";
}

int main()
{
  int n,a,b,c;
  cin >> n;
  
  for(int i=0;i<n;i++){
    cin >> a >> b >> c;
    string str=triangle(a,b,c);
    cout << str << endl;
  }
  return 0;
}

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

int main() {
    int n; cin >> n;
    while (n--) {
        int max, b, c;
        cin >> max >> b >> c;
        if (max < b) swap(max, b);
        if (max < c) swap(max, c);
        cout << (max * max == b * b + c * c ? "YES" : "NO") << endl;
    }
    return 0;
}