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 <stdio.h>
int main()
{
  int a,b,c,sum,i,n;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d %d",&a,&b,&c);
    a=a*a;
    b=b*b;
    c=c*c;
    sum=a+b+c;
    if(a=1&&b=1&&c=1){
      printf("NO\n");
    }else if(sum/2==a||sum/2==b||sum/2==c)printf("YES\n");
    else printf("NO\n");
  }

  return 0;
}

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

int main () {
    int n,i;
    float a,b,c
    for(i=0;i<n;i++){
        cin >> a >> b >> c;
        if(hypot(a,b)==c||hypot(b,c)==a||hypot(a,c) == b) cout << "YES" << endl;
        else cout << " NO" << endl;
    }
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(a[2]*a[2]==a[1]*a[1]+a[0]*a[0]){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

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

int main() {
    int n;
    cin >> n;
    REP(i,n) {
        int a, b, c;
        cin >> a >> b >> c;
        if (isright(a,b,c)) cout << "YES" << endl;
        else cout << "NO" << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[3];
while(cin >>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" << endl;
else cout << "no"<<endl;
}
return 0;
}

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

using namespace std;

int main(void)
{
	int a[3];
	int n;
	
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		for (int j = 0; j < 3; j++){
			scanf("%d", &a[j]);
		}
		
		sort(a, a + 3);
		
		if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]){
			puts("YES");
		}
		else {
			puts("NO");
		}
	}
	
	return (0);
}

C++: /*
AOJ_0003_IsitaRightTriangle?

EOFはWindowsはCtrl+Z,UNIXはCtrl+D

方針
配列入れて昇順ソートして　１番目と２番目の二乗の合計が
三番目の二乗になってるか確かめる。

配列の大きさが３固定なので、multisetに格納するのはもったいない
普通の配列に入れて、sortを使う

*/

#include <iostream>
#include <string>
#include <cstdio>
#include <math.h>
#include <algorithm>

using namespace std;

int main() {
	int N, side[3], i,j;

	cin >> N;

	for (i = 0; i < 3; i++){
		cin >> side[0] >> side[1] >> side[2];
		sort(side, side + 3, greater<int>());

		if (pow(side[0], 2) + pow(side[1], 2) == pow(side[2], 2)){
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}	
	}
	return 0;
}

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

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

  scanf("%d",&N);
  for(i = 0;i<N;i++){
    cin >> a >> b >> c;
    a*=a;
    b*=b;
    c*=c;
    if(a+b==c||b+c==a||a+c==b)cout << "YES" << endl;
    else cout << "NO" << endl;

}
  return 0;
}

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

int N;
int a[3]; 
int b,c,d;

int main() {
  for (int i = 0; i < N; ++i) {
    scanf("%d %d %d",a[1],a[2],a[3]);
    sort(a,a+3);
    b = a[1]*a[1];
    c = a[2]*a[2];
    d = a[3]*a[3];
    if ( b + c = d ) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
  
}

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

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

C++: #include<stdio.h>

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

C++: #include<stdio.h>
int main(void)
{
	int N=0;
    unsigned a[1001]={0},b[1001]={0},c[1001]={0};
	int soto=0;
	int i=0;
	scanf("%d",&N);
	for (i=0;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=0;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++: #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#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 > b || a == c)&& b > c){
			if (a * a == b * b + c * c)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
		else if ((a < b || a == c) && b > c){
			if (a * a + c * c == b * b)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
		else if ((a < b || a == b) && b < c){
			if (a * a + b * b == c * c)
				std::cout << "YES\n";
			else
				std::cout << "NO\n";
		}
		else
			printf("NO\n");
	}
	return 0;
}

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

class triangle{
    vector<int> data;
    
public:
    triangle() { data.reserve(3); }
    void set(int *a);
    char* isright();
    void clearset() {data.clear();}
};

void triangle::set(int *a)
{
    data.push_back(a[0]);
    data.push_back(a[1]);
    data.push_back(a[2]);

    sort(data.begin(), data.end());
}

char* triangle::isright()
{
    if(data[0] * data[0] + data[1] * data[1] == data[2] * data[2])
        return "YES";
    return "NO";
}

int main()
{
    triangle tri;
    int loop, buff[3];
    cin >> loop;
    for(int c =0; c< loop; c++)
    {
        cin >> buff[0] >> buff[1] >> buff[2];
        tri.set(buff);
        cout << tri.isright() << endl;
        tri.clearset();
    }

    return 0;
}