Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

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)
	    sort.Ints(data)
	    if data[0]*data[0]+data[1]*data[1] == data[2]*data[2]{
	        fmt.Fprintln(out, "YES")
	    }else{
	        fmt.Fprintln(out, "NO")
	    }
	}
}

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
}

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

#define rep(i,n) for(int i=0; i<n; i++)
int main(){
	int N, a, b, c;
	cin >> N;
	rep(i,N){
		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 <stdio.h>

int aaa(int a, int b, int c){
	if(a*a+b*b==c*c){
		return 1;
	}
	return 0;
}

int main (void){
	int a, b, c, i, n;
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d%d%d", &a, &b, &c);
		if(aaa(a, b, c) || aaa(a, c, b) || aaa(c, b, a)){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	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;
    int a = max(_a, max(_b, _c)), b, c;
    if (a == _a) {
      b = _b;
      c = _c;
    } else if (a == _b) {
      b = _a;
      c = _c;
    } else if (a == _c) {
      b = _b;
      c = _a;
    }
    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 n;
	int a, b, c;
	for(cin>>n; n>0; --n) {
		cin>>a>>b>>c;
		
		int p;
		if(a>b) {
			p=a;
			a=b;
			b=p;
		}

		if(b>c) {
			p=b;
			b=c;
			c=p;
		}
		if(a>b) {
			p=a;
			a=b;
			b=p;
		}

		//cout<<a<<b<<c<<endl;
		if(a*a + b*b == c*c) {
			cout<<"YES"<<endl;
		} else {
			cout<<"NO"<<endl;
		}
	}
}

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

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

using namespace std;

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

    cin>>n;

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

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  vector<int> edge(3);
  scanf("%d",&n);
  for(int i=0;i<n;++i){
    scanf("%d %d %d",&edge[0],&edge[1],&edge[2]);
    sort(edge.begin(),edge.end());
    printf("%s\n",edge[0]*edge[0]+edge[1]*edge[1]==edge[2]*edge[2] ? "YES" : "NO");
  }
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int n,a[3];
int main(){
	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<<"NO"<<endl;
		else cout<<"YES"<<endl;
	}
}

C++: #include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
using namespace std;
int main(){
       
    cin.tie(0);
    ios::sync_with_stdio(false);
       
    int n;
    cin >> n;
      
    REP(i, n){
        vector<int> vc(3);
        for(auto &x : vc){
            cin >> x;
        }
        sort(vc.begin(), vc.end());
        cout << ( vc[0]*vc[0] + vc[1]*vc[1] == vc[2]*vc[2] ? "YES" : "NO" ) << endl;
    }
    return 0;
}

C++: #include <iostream>

int main()
{
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    int N, a, b, c;
    std::cin >> N;
    for (int i = 0; i < N; ++i) {
        std::cin >> a >> b >> c;
        if (a*a + b*b == c*c || b*b + c*c == a*a || c*c + a*a == b*b)
            std::cout << "YES" << std::endl;
        else
            std::cout << "NO" << std::endl;
    }
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <sstream>

using namespace std;


vector<string> splitString(const string& str, const string& separator = " ") {
	vector<string> ret;

	std::size_t bp, ep;
	bp = ep = 0;
	while((ep = str.find_first_of(separator, bp)) != string::npos){
		if(bp != ep){
			ret.push_back(string(str.begin() + bp, str.begin() + ep));
		}
		bp = ep + 1;
	}

	if(bp <= str.size() - 1){
		ret.push_back(string(str.begin() + bp, str.end()));
	}

	return ret;
}

template <class T>
T convertStringToNumber(const string& str) {
	stringstream ss;
	T ret;

	ss << str;
	ss >> ret;

	return ret;
}


void inputData(vector<string>& data_set) {
	string buffer;

	getline(cin, buffer);
	int n = convertStringToNumber<int>(buffer);

	for(int i = 0; i < n; ++i) {
		getline(cin, buffer);
		data_set.push_back(buffer);
	}
}

bool isRightTriangle(const vector<int>& edge_set) {
	int max_index = 0;

	if(edge_set[max_index] < edge_set[(max_index+1)%3])
		max_index = (max_index+1)%3; 
	if(edge_set[max_index] < edge_set[(max_index+2)%3])
		max_index = (max_index+2)%3; 

	return ((edge_set[max_index] * edge_set[max_index]) ==
				(edge_set[(max_index+1)%3] * edge_set[(max_index+1)%3]
				+ edge_set[(max_index+2)%3] * edge_set[(max_index+2)%3]));
}


vector<bool> evaluateTriangle(const vector<string>& data_str) {
	vector<bool> ret(data_str.size());

	for(int i = 0; i < data_str.size(); ++i) {
		auto temp = splitString(data_str[i]);
		vector<int> buff { convertStringToNumber<int>(temp[0]),
							convertStringToNumber<int>(temp[1]),
							convertStringToNumber<int>(temp[2])};

		ret[i] = isRightTriangle(buff);
	}

	return ret;
}


void doAllProcess() {
	vector<string> buffer;

	inputData(buffer);

	vector<bool> ret = evaluateTriangle(buffer);

	for(int i = 0; i < ret.size(); ++i)
		std::cout << (ret[i] ? "YES" : "NO") << std::endl;
}



int main() {
	doAllProcess();

	return 0;
}

C++: #include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#define LLU long long unsigned int
#define LLD long long double
#define FOR(i,N) for(int i=0;i<(N);i++)
#define Vec vector<int>
#define Vit vector<int>::iterator

using namespace std;


int main()
{

    int cases;
    cin>>cases;

    while(cases--){
    int a,b,c;
    cin>>a>>b>>c;
    int flag=0;
    if((a*a+b*b)==c*c)flag=1;
    else if((b*b+c*c)==a*a)flag=1;
    else if((a*a+c*c)==b*b)flag=1;
    if(flag)cout<<"YES"<<endl;
    else cout<<"NO"<<endl;
    }
    return 0;
}

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

using namespace std;

int main(){
        int a, b, c, i;
        bool ans = false;
        while(scanf("%d%d%d", &a, &b, &c) != EOF){ 
                ans = false;
                if(a * a + b * b == c * c)
                        ans = true;
                if(b * b + c * c == a * a)
                        ans = true;
                if(c * c + a * a == b * b)
                        ans = true;
                printf("%s\n", ans ? "YES" : "NO");
        }
        return 0;
}