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 n,a,b,c,t;
scanf("%d",&n);
while(n--){
scnaf("%d %d %d",&a,&b,&c);
if(a<b){t=a;a=b;b=t;}
if(a<c){t=a;a=c;c=t;}
if(a*a==b*b+c*c)printf("Yes\n");
else            printf("No\n);
}
return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int a[3],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])printf("Yes\n");
else printf("No\n");
}
}

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

C++: #include <cstdio>

long maks(long a, long b, long c);

int main() {
    int t;
    scanf("%d", &t);
    for (;t > -1; t--) {
        long a, b, c;
        scanf("%d %d %d", &a, &b, &c);
        a = a*a;
        b = b*b;
        c = c*c;
        if ( maks(a, b, c) == (a + b + c - maks(a, b, c))) {
             printf("YES\n");
        } else printf("NO\n");
    }
    return 0;
}

long maks(long a, long b, long c) {
     if ((a > b)&&(a > c)) {return a;}
     else if ((b > a)&&(b > c)) {return b;}
     else {return c;}
}

C++: #include<iostream>

using namespace std;
 
int main(){
 
 int tri[1000][3];
 int a,b,c,N;
 
 cin >> N;
 
 for(int i = 0; i < N; i++){
 
  cin >> tri[i][0] >> tri[i][1] >> tri[i][2];
 
  a = tri[i][0]*tri[i][0];
  b = tri[i][1]*tri[i][1];
  c = tri[i][2]*tri[i][2];

 if(a == b+c || b == a+c || c == a + b)
  cout << "YES" << endl;
 else
  cout << "NO" << endl;
 }
 return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int x[3];
	int a,b;
	cin >> b;
	for(a=0;a<b;a++) {
		cin >> x[0] >> x[1] >> x[2];
		if(x[0]*x[0] + x[1]*x[1] == x[2]*x[2]){
			cout << "YES" << endl;
		}
		else if(x[0]*x[0] + x[2]*x[2] == x[1]*x[1]){
			cout << "YES" << endl;
		}
		else if(x[1]*x[1] + x[2]*x[2] == x[0]*x[0]){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main(){
	using namespace std;
	while(1){
		int n;
		long int a[3] = { 0 };
		cin >> n;
		if(cin.eof() || n == 0) break;
		for(int i = 0;i<n;i++){
			cin >> a[0] >> a[1] >> a[2];
			sort(a,a+3);
			if((a[2]^2) == (a[0]^2)+(a[1]^2)) cout << "YES" << endl;
			else cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,N;
	cin>>N;
	for(int i=1;i<=N; i++){
		cin>>a>>b>>c;
		if(a*a+b*b==c*c){
			cout<<"Yes"<<endl;
		}else if(a*a+b*b!=c*c){
			cout<<"No"<<endl;
		}
	}

}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

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

	for (int i = 0; i < n; i++)
	{
		vector<int> a(3);
		for (int j = 0; j < a.size(); j++)
		{
			cin >> a.at(j);
		}
		sort(a.begin(), a.end());

		cout << (a.at(0)*a.at(0) + a.at(1)*a.at(1) == a.at(2)*a.at(2) ? "YES" : "NO") << endl;
	}
}

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

long int l[3][3];

void swap(int a, int b, int c){
	int buf = l[c][a];
	l[c][a] = l[c][b];
	l[c][b] = buf;
}

//bubble
void sort(int c){
	for(int i = 0; i < 2; i++){
		for(int j = i; j < 2; j++){
			if(l[c][j] > l[c][j+1]) swap(j,j+1,c);	
		}
	}
}

int main(){
int buf;

cin >> buf;

for(int i = 0; i < buf; i++){	
	cin >> l[i][0] >> l[i][1] >> l[i][2];
	sort(i);
}

for(int j = 0; j < buf; j++){
	if(l[j][2]*l[j][2] == l[j][0]*l[j][0] +l[j][1]*l[j][1]){
		cout << "YES";
	}else{
		cout << "NO";
	}

	if(j != buf-1) cout << endl;
}

return 0;
}

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

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

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

int main(){
    int a[3];
    int n;

    scanf("%d", &n);
    while(n>0) {
        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]) {
            printf("YES\n");
        }else{
            printf("NO\n");
        }
        n--;
    }
}

C++: #include <iostream>

bool is_right_triangle(u_int a, u_int b, u_int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}

int main(void) {
    u_int n, a, b, c;

    std::cin >> n;
    while (std::cin >> a >> b >> c) {
        if (is_right_triangle(a, b, c)) {
            std::cout << "Yes" << std::endl;
        } else {
            std::cout << "No" << std::endl;
        }
    }

    return 0;
}

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

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

	return 0;
}

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

        }


    }

    return 0;
}