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, d1, d2, d3;

	while ( 1 ) {
		cin >> a >> b >> c;

		d1 = a * a;
		d2 = b * b;
		d3 = c * c;
	

		if ( d1 == ( b * b ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d2 == ( a * a ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else if ( d3 == ( a * a ) + ( c * c ) ) {
			cout << "YES" << endl;
		} else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

int main(void) {
    int length[3];
    int n;
    
    cin >> n;
    
    for(int i = 0; i < n; ++i) {
        cin >> length[0] >> length[1] >> length[2];
        sort(length, length + 3);
        if(length[0] * length[0] + length[1] * length[1] == length[2] * length[2]) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }
}

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

int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    vector<int> array;
    int a;
    cin >> a;
    array.push_back(a);
    cin >> a;
    array.push_back(a);
    cin >> a;
    array.push_back(a);
    sort(array.begin(), array.end(), greater<int>());
    cout << (array[0] * array[0] == array[1] * array[1] + array[2] * array[2] ? "YES" : "NO") << endl;
  }
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;cin >> n;
	for(int i = 0; i < n; i++){
		int l[3] = {};
		for(int j = 0; j < 3; j++){
			cin >> l[j];
		}
		bool flag = false;
		for(int j = 0; j < 3; j++){
			//printf("%d %d %d",l[j]*l[j],l[(j+1)%3]*l[(j+1)%3],l[(j+2)%3]*l[(j+2)%3]);
			if(l[j]*l[j] + l[(j+1)%3]*l[(j+1)%3] == l[(j+2)%3]*l[(j+2)%3]){
				flag = true;
				break;
			}
		}
		cout << (flag?"YES":"NO") << endl;
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
 
int main() {
    int n;
    cin >> n;
    for (int i=0;i<n;++i){
        int a;
        int b;
        int c;
        cin >> a >> b >> c;
        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;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a,b,c;
  cin>>n;
  int d[n];
  for(int i=0;i<n;i++){
    cin>>a>>b>>c;
    if(a*a==(b*b+c*c)){
      d[i]=1;
    }
    else if(b*b==(a*a+c*c)){
      d[i]=1;
    }
    else if(c*c==(a*a+b*b)){
      d[i]=1;
    }
    else{
      d[i]=0;
    }
  }
  for(int i=0;i<n;i++){
    if(d[i]==1){
      cout<<"YES"<<endl;
    }
    else{
      cout<<"NO"<<endl;
    }
  }
}

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

using namespace std;

//input
int a[3];

void solve(){
	sort(a, a + 3);
	if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
		printf("YES\n");
	else
		printf("NO\n");
}

int main(int argc, char const *argv[]){
//	freopen("in.txt", "r", stdin);

	int t;
	scanf("%d", &t);
	while(t --){
		for(int i = 0; i < 3; i ++)
			scanf("%d", &a[i]);
		solve();
	}

	return 0;
}

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

bool judge(int x, int y, int z)
{    
    static bool flag = false;
    if (x * x + y * y == z * z){
        flag = true;
    } else if (y * y + z * z == x * x){
        flag = true;
    } else if (z * z + x * x == y * y){
        flag = true;
    }
    return flag;
}


int main(void)
{
    int repeat, a, b, c;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        bool flag = judge (a, b, c); 
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

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

using namespace std;

int main() {
    int i,j,n,a,b,c;

    cin >> n;

    for(i = 0;i < n;i++){
        cin >> a >> b >> c;

        if(a == double(sqrt(pow(b,2) + pow(c,2)))){
            cout << "Yes" << endl;
        }

        else if(b == double(sqrt(pow(a,2) + pow(c,2)))){
            cout << "Yes" << endl;
        }

        else if(c == double(sqrt(pow(a,2) + pow(b,2)))){
            cout << "Yes" << endl;
        }

        else{
            cout << "No" << endl;
        }
    }

    return 0;
}

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

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

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

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

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

int main() {
  int ct = 0;
  vector<int> v(3);
  queue<bool> q;

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define REP(a) while(a--)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int n;
	cin>>n;
	REP(n){
		vi in(3);
		rep(i,3)cin>>in[i];
		sort(all(in));
		if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}

}

C++: #include <stdio.h>
 
using namespace std;
 
 
int main(){
    int n,a,b,c,A,B,C;
    scanf("%d",&n);
 
    for(int i=0;i<n;i++){
        scanf("%d %d %d",&a,&b,&c);
        A = a*a;
        B = b*b;
        C = c*c;
        if(A+B==C||B+C==A||C+A==B){
            printf("YES\n");
        }else{
            printf("NO\n");
        }
    }
 
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,a,b,c;
    std::deque<int> deq;
    cin >> n;
    for (int 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;
        }
    }
    
    
}

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

using namespace std;

int main() {
	int a[3];
	int tc; scanf("%d", &tc);
	for(int tci=0; tci < tc; tci++) {
		scanf("%d%d%d", a,a+1,a+2);
		sort(a,a+3);
		printf("%s\n",a[0]*a[0]+a[1]*a[1]==a[2]*a[2] ? "YES" : "NO");
	}
	return 0;
}