Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	for i := 0; i < n; i++ {
		a := nextInt()
		b := nextInt()
		c := nextInt()
		if a*a == b*b + c*c || b*b == a*a + c*c || c*c == a*a + b*b {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
		continue
	}
}

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 == a + c || c == a + b) {
            cout << "Yes" << endl;
        } else {
            cout << "No" << endl;
        }
    }

    return 0;
}

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

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		int d = 32;
		if(a[0]>d || a[1]>d || a[2]>d)puts("hogehogehoge");
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2]){
			puts("YES");
		}else{
			puts("NO");
		}
	}
}

C++: #include <iostream>

using namespace std;

int main(int argc, char **argv) {
    int n;

    cin >> n;

    for (int i = 0; i < n; i++) {
        int a, b, c;
        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;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
    int a,b,c,n;
    while(~scanf("%d",&n)){
    while(n--)
    {
        cin>>a>>b>>c;
        if(a+b>c&&a+c>b&&b+c>a&&(a*a+b*b==c*c||a*a==b*b+c*c||a*a+c*c==b*b))
            cout<<"YES"<<endl;
        else
            cout<<"NO"<<endl;
    }
    }
    return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    int A[3];
    scanf("%d", &n);
    for(int i=0; i<n; i++){
        scanf("%d %d %d", &A[0], &A[1], &A[2]);
        sort(A, A+3);
        double a= (double)A[0], b= (double)A[1], c= (double)A[2];
        double cosine = (b*b+a*a-c*c)/(2*b*c);

        if(cosine == 0) printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}

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

C++: #include <iostream>
#include <cmath>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
  for (int i = 0; i < n; ++i) {
    int x, y, z;
    cin >> x >> y >> z;
    int m = max(x, max(y, z));
    if (m == x) {
       if (x > y + z) cout << "YES";
       else cout << "NO";
    } else if (m == y) {
       if (y > x + z) cout << "YES";
       else cout << "NO";
    } else if (m == z) {
       if (z > x + y) cout << "YES";
       else cout << "NO";
    }
    cout << endl;
  }
  }
  return 0;
}

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

int main(){
	int N;
	int l1, l2, l3;
	int answer=0;
	vector<int> lines;
	cin >> N;
	for(int i=0;i<N;i++){
		cin >> l1 >> l2 >> l3;
		lines.push_back(l1);
		lines.push_back(l2);
		lines.push_back(l3);
		while(next_permutation(lines.begin(), lines.end())){
			if(pow(lines[0],2) == pow(lines[1],2) + pow(lines[2],2)) answer = 1;
		}
		if (answer == 1) cout << "YES\n";
		else cout << "NO\n";
		lines.clear();
		answer = 0;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define forn(x, n)              for (int x = 0; x < n; x++)
#define forr(x, n)              for (int x = n; x >= 0; x--)
#define fore(x, a, b, c)        for (int x = a; x <= b; x += c)
#define forre(x, a, b, c)       for (int x = a; x >= b; x -= c)
#define clr                     cin.ignore(numeric_limits<streamsize>::max(), '\n')
#define all(container)          (container).begin(), (container).end()
#define rall(container)         (container).rbegin(), (container).rend()
#define FILL(x, val)            memset(x, val, sizeof(x))
#define sz(container)           ((int) (container).size())
#define pb                      push_back
#define eb                      emplace_back
#define fi                      first
#define se                      second
#define mod                     (ll)1000000007
#define INF                     (int)0x3f3f3f3f

using namespace std;

#ifdef LOCAL_DEFINE
    #include "../../CLionProjects/Codeforces/library/DEBUG.hpp"
#endif

template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }
int MAX() {return -INF;}
int MIN() {return INF;}
template<typename T, typename... Args>
T MAX(T a, Args... args) {return max(a, MAX(args...));}
template<typename T, typename... Args>
T MIN(T a, Args... args) {return min(a, MIN(args...));}

typedef long long ll; 
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pair<int, int>> vpii;
typedef vector<pair<long long, long long>> vpll;


int main(void) {    
#ifdef LOCAL_DEFINE
    freopen("in.txt", "r", stdin);
#endif
    
    int t; 
    scanf("%d", &t);
    while (t--) {
        vi sides(3);
        scanf("%d %d %d", &sides[0], &sides[1], &sides[2]);
        sort(all(sides));
        if (sides[2] * sides[2] == sides[1] * sides[1] + sides[0] * sides[0]) printf("YES\n");
        else printf("NO\n");
    }

#ifdef LOCAL_DEFINE
    cerr << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << '\n';
#endif
    return 0;
}

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

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

using namespace std;

int n;
int x[3];
bool ans;

int main(){
	cin >> n;
	while (n--){
		cin >> x[0] >> x[1] >> x[2];
		sort(x, x + 3);
		(x[0] * x[0] + x[1] * x[1] == x[2] * x[2]) ? cout << "YES\n" : cout << "NO\n";
	}
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    vector<int> a;
    int n;
    cin>>n;
    while(n--){
        int t;
        for(int i=0;i<3;i++){
            cin>>t;
            a.push_back(t);
        }
        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;
        a.clear();
    }
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	static long long a,b[3]={0};
	cin>>a;
	for (int A=0;A<a;A++){
		cin>>b[0]>>b[1]>>b[2];
		sort(b,b+3);
		b[0]*=b[0];
		b[1]*=b[1];
		b[2]*=b[2];
		if (b[2]!=b[0]+b[1]) cout<<"No"<<endl;
		else cout<<"Yes"<<endl;
	}
	return 0;
}

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

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(begin(a), end(a));
    if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) {
      cout << "YES" << "\n";
    } else {
      cout << "NO" << "\n";
    }
  }
}

C++: #include <cstdio>

int main()
{
	int N, ia, ib, ic;
	int iTrueFlag[1000];

	scanf("%d",&N);

	for( int i=0;i<N;i++ ){
		scanf("%d %d %d",&ia, &ib, &ic);

		if( (ia*ia) + (ib*ib) == (ic*ic) )
			iTrueFlag[i] = 1;
		else
			iTrueFlag[i] = 0;
	}

	for( int i=0;i<N;i++ ){
		if( iTrueFlag[i] == 1)
			printf("YES\n");
		else
			printf("NO\n");
	}

	return 0;
}