Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	n := nextInt()
	for i := 0; i < n; i++ {
		data := nextInts(3)
		fmt.Fprintln(out, checkTriangle(data))
	}
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInts(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

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

C++: #include<cstdio>

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

C++: #include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
using namespace std;
int main(){
     
    cin.tie(0);
    ios::sync_with_stdio(false);
     
    int n;
    cin >> n;
    
    REP(i,n){
        vector<int> vc(n);
        for(auto &x : vc){
            cin >> x;
            cout << x << " ";
        }
        sort(vc.begin(), vc.end());
        cout << ( vc[0]*vc[0] + vc[1]*vc[1] == vc[2]*vc[2] ? "YES" : "NO" ) << endl;
    }
    return 0;
}

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++)
		{
			Array arr(3);
			readAll(arr, n);
			cout << "YES" << endl;
			//sort(ALL(arr));
			//cout << (arr[2] * arr[2] == arr[0] * arr[0] + arr[1] * arr[1] ? "YES" : "NO") << endl;
		}
	}
	return 0;
}

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

int main(){

	int a[3];

	while(std::cin >> a[0] >> a[1] >> a[2]){
		std::sort(a,a+3);
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){
			std::cout << "YES" << std::endl;
		}
		else{
			std::cout << "NO" << std::endl;
		}
	}
}

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

int main(){
	int n, a, b, c, ma, sum, rst;
	
	cin >> n;
	
	for(int i=0;i<n;i++){
		cin >> a >> b >> c;
		a*=a; b*=b; c*=c;
		sum=a+b+c;
		ma=max(a,max(b,c));
		rst=sum-ma;
		if(rst==ma) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	
	return 0;
}

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

#define Triangle(s1,s2,s3) if(s1*s1+s2*s2==s3*s3)
using namespace std;

int main()
{
	int n;
	int h[3];
	vector<int> side;
	int i;
	
	cin >> n;
	
	for(i=0;i<n;i++)
	{
		side.clear();
		
		for(int j=0;j<3;j++)
		{
			cin >> h[i];
			side.push_back(h[i]);
		}
		
		sort(side.begin(),side.end());
		
		Triangle(side[0],side[1],side[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}

C++: #include <iostream>
 
 
bool judging(int x, int y, int z)  //widthes of three edges
{
    if (x * x + y * y == z * z) {
        return true;
    } else if (z * z + x * x == y * y) {
        return true;
    } else if (y * y + z * z == x * x) {
        return true;
    } else {
        return false;
    }
}
 
 
int main()
{
    int a, b, c, n;  //the number of lines
    std::cin >> n;
    for (int i = 0; i < n; i++) {
        std::cin >> a >> b >> c;
        if (judging(a, b, c)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
}

C++: 
/*
 * main.cpp
 *
 *  Created on: 2011/04/01
 *      Author: satoki
 *      21:47 ~ 22:08
 */
#include <iostream>
#include <string.h>
using namespace std;

int iN;
int iTra[3];
bool bOutput;

bool input() {
  if (iN > 0)
    scanf("%d %d %d", &iTra[0], &iTra[1], &iTra[2]);
  else
    return false;
  iN--;
  return true;
}

void manage() {
  int i, j, tmp;
  for (i = 0; i < 3; i++) {
    iTra[i] *= iTra[i];
  }
  for (i = 0; i < 3; i++) {
    for (j = 2; j > i; j--) {
      if (iTra[j - 1] > iTra[j]) {
        tmp = iTra[j - 1];
        iTra[j - 1] = iTra[j];
        iTra[j] = tmp;
      }
    }
  }
  if (iTra[0] + iTra[1] == iTra[2])
    bOutput = true;
  else
    bOutput = false;
}

int main() {
  scanf("%d", &iN);
  while (1) {
    if (!input()) break;
    manage();
    if (bOutput)
      printf("YES\n");
    else
      printf("NO\n");
  }
}

C++: #include <fstream>
#include <iostream>
#include <cmath>
#include <vector>
#include <queue>
#include <utility>
#include <algorithm>
using namespace std;

int main() {
  int n;
  cin >> n;
  int a[3];
  while (n--) {
    cin >> a[0] >> a[1] >> a[2];
    sort(a, a+3);
    string res;
    if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
      res = "YES";
    } else {
      res = "NO";
    }
    cout << res << endl;
  }
}

C++: #include <stdio.h>
int main() {int N,a,b,c;for (scanf("%d",&N);N--;) {scanf("%d %d %d",&a,&b,&c);if ((a*a+b*b==c*c)||(a*a+c*c==b*b)||(b*b+c*c==a*a)) puts("YES"); else puts("NO");}return 0;}

C++: #include <iostream>
using namespace std;
 
int main()
{
   int a,b,c,x, y, z,n;
 
   // read in n 
   cin>>n;

   // for n set of data, read into 3 sides 
   
   for(int i=1;i<=n;i++)
   {
      cin>>a>>b>>c;          
      x=a*a; y=b*b; z=c*c;
      
      // check if they are triangle
      if(x+y==z||x+z==y||y+z==x)
          cout<<"Yes"<<endl;
      else
          cout<<"No"<<endl;
    }   
    return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(void) {
	int i=1, j, max, a[3],kaisu;
	cin >> kaisu;
	while (1) {
		cin >> a[0] >> a[1] >> a[2];
		if (a[0] >= a[1] && a[0] >= a[2]) {
			if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2])
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else if (a[1] >= a[0] && a[1] >= a[2]) {
			if (a[1] * a[1] == a[2] * a[2] + a[0] * a[0])
				cout << "YES" << endl;
			else
				cout << "NO" << endl;
		}
		else
		{
			if (a[2] * a[2] == a[1] * a[1] + a[0] * a[0])
				cout << "YES" << endl;
			else
				cout << "NO" << endl;

		}

		if (i == kaisu)break;
		i++;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
	int n;
	int a,b,c;
	bool flg;
	cin>>n;
	for(int i=0;i<n;i++){
		flg=false;
		cin>>a>>b>>c;
		if((c*c)==(a*a)+(b*b)||(b*b)==(a*a)+(c*c)||(a*a)==(b*b)+(c*c)){
			flg=true;
		}
		cout<<((flg)?"YES":"NO")<<endl;
	}
	return 0;
}