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++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int a, b, c;
	while(a >> b >> c){
		if(a+b <= c || a+c <= b || b+c <= a){
			cout << "NO" << endl;
		}
		else{
			cout << "YES" << 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();
		
//		vector<int>::iterator it=side.begin();
		
		for(int j=0;j<3;j++)
		{
			cin >> h[j];
			side.push_back(h[j]);
//			cout << "side: " << side[j] << endl;
		}
		
		sort(side.begin(),side.end());
		
//		it=side.begin();
		
//		cout << endl;
		
//		for(;it!=side.end();it++)
//			cout << *it << " " ;
		
//		cout << endl;
		
//		cout << "side1:" << side[0]*side[0] << " side2:" << side[1]*side[1] << " side3:" << side[2]*side[2] << endl;
		
		Triangle(side[0],side[1],side[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int main() {
	int N; cin >> N;
	while (N--) {
		int a, b, c; cin >> a >> b >> c;
		if (a > b)swap(a, b);
		if (b > c)swap(c, b);
		if (a*a + b*b ==c* c)cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a,b,c;
  int i;
  cin>>i;
  for(int j = 0 ; j<i ; j++){
    cin>>a>>b>>c;
  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 == b*b+a*a)
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
  }
  return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
  
using namespace std;
  
int main(void){
  int n,array[3],i;
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d",&array[0],&array[1],&array[2]);
    sort(array,array+3);
    if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2])  printf("Yes\n");
    else  printf("No\n");
  }
  
  return 0;
}

C++: #include <iostream>
#include <algorithm>
 
using namespace std;
 
int main(){
  int num,tmp;
 
  cin >> num;

  int a[num][3];

  for(int i=0; i<num; ++i)
    cin >> a[i][0] >> a[i][1] >> a[i][2];


  for(int i=0; i<num; ++i){

    sort(a[i],a[i]+3,greater<int>());
    
    if(a[i][0]*a[i][0] == a[i][1]*a[i][1] + a[i][2]*a[i][2]){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }  

}

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

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

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

using namespace std;

static bool judge_rightTri(vector<int> &dataset) {

	sort(dataset.begin(), dataset.end());

	if ((pow(dataset.at(0), 2) + pow(dataset.at(1), 2)) == pow(dataset.at(2), 2)) {
		return true;
	}

	return false;
}

int main(void) {
	int input_num;
	cin >> input_num;

	vector<vector<int>> input(input_num, vector<int>(3, 0));

	for (vector<int> &dataset : input) {
		for (int &data : dataset) {
			cin >> data;
		}
	}

	for (vector<int> &dataset : input) {
		if (true == judge_rightTri(dataset)) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}

	return 0;
}

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

#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i <= _##i poi i++)
#define uptil(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i < _##i poi i++)
#define downto(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i >= _##i poi i--)
#define downtil(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i > _##i poi i--)

#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define poi ;
#define poipoi << "\n"

using namespace std;

bool pyon(int a, int b, int c){
    return c && a * a + b * b == c * c poi
}

int main(){
    int n poi
    cin >> n poi
    times(n, i){
        int a, b, c poi
        cin >> a >> b >> c poi
        if(pyon(a, b, c) || pyon(b, c, a) || pyon(c, a, b)) cout << "YES" poipoi poi
        else cout << "NO" poipoi poi
    }
    return 0 poi
}

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

C++: #include <iostream>

void checkTringle(int a,int b,int c){
    if(a^2==b^2+c^2){
        std::cout << "YES" << std::endl;
    }else{
        std::cout << "NO" << std::endl;
    }
}

int main(int argc, char *argv[])
{
    int dataSize;
    std::cin >> dataSize;

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


        if(a>b){
            if(a>c){
                checkTringle(a,b,c);
            }else{
                checkTringle(c,a,b);
            }
        }else{
            if(b>c){
                checkTringle(b,c,a);
            }
        }
    }
}

C++: #include <bits/stdc++.h>
using namespace	std;

int main() {
  int ct;
  vector<int> v;

  for(int i = 0; i < ct; i++) {
    scanf("%d %d %d", &v[0], &v[1], &v[2]);
    sort(v.begin(), v.end());
    printf("%s\n", v[2]*v[2] == v[0] * v[0] + v[1] * v[1] ? "YES" : "NO");
    v.clear();
  }
  return 0;
}

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

using namespace std;

int main(){

    int N,a[3];
    scanf("%d",&N);
    while(N--){

        scanf("%d%d%d",&a[0],&a[1],&a[2]);

        sort(a,a+3);

        if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0])
            printf("YES\n");

        else
        printf("NO\n");
    }
    return 0;

    }

C++: #include<iostream>
int main(void){
	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<bits/stdc++.h>
using namespace std;
int main(){
 int n;
 cin >> n;
 vector<int> a(3);
 for(int i=0;i<n;i++){
  cin >> a[0] >> a[1] >> a[2];
  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;
 }
 return 0;
}

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