Go: package main

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

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

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"
	} else {
		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>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
void swap(int idx1, int idx2, int *node)
{
	int f = node[idx1];
	node[idx1] = node[idx2];
	node[idx2] = f;
}
//nlogn
void quickSort(int left, int right, int *node)
{
	int pl = left;
	int pr = right;
	int pivot_f = node[(pl + pr) / 2];
	do
	{
		while (node[pl] < pivot_f)
		{
			pl++;
		}
		while (node[pr]> pivot_f)
		{
			pr--;
		}
		if (pl <= pr)
		{
			swap(pl++, pr--, node);
		}
	} while (pl <= pr);
	if (left < pr) quickSort(left, pr, node);
	if (pl <= right) quickSort(pl, right, node);
}

bool compare(int a, int b)
{
	if (a == b)
	{
		return true;
	}
	else {
		return false;
	}
}
int main()
{
	int max = 0;
	cin >> max;
	for (int num = 0; num <= max; num++)
	{
		string str;
		string item;
		vector<string> list;
		getline(cin, str);
		int edge[3];
		stringstream ss(str);
		while (getline(ss, item, ' ') && !item.empty()) {
			list.push_back(item);
		}
		
		edge[0] = stoi(list[0].c_str());
		edge[1] = stoi(list[1].c_str());
		edge[2] = stoi(list[2].c_str());
		quickSort(0, 2, edge);

		int edge1 = edge[2] * edge[2];
		int edge2 = edge[0] * edge[0] + edge[1] * edge[1];
		if (compare(edge1, edge2))
		{
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

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

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

int main(){
	double sd[3];
	int N;
	cin>>N;
	while(N>0){
		cin>>sd[0]>>sd[1]>>sd[2];
		sort(sd,sd+3);
		if(sd[2] == sqrt(pow(sd[1],2.0)+pow(sd[0],2.0))){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
		N--;
	}
	
	
	return 0;
}

C++: // 0003.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include<stdio.h>
#include "stdafx.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
int main()
{
	int n ;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a[3];
		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>

int main(){
	int a,b,c;
	
	std::cin>>a>>b>>c;
	if(a*a==b*b+c*c){
		std::cout<<"YES"<<std::endl;
		}if(b*b==a*a+c*c){
		std::cout<<"YES"<<std::endl;
		}if(c*c==b*b+a*a){
		std::cout<<"YES"<<std::endl;
			}else{
			std::cout<<"NO"<<std::endl;
			}

	

    return 0;
}

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

int main(){
    int n;
    scanf("%d", &n);
    int sides[3];
    for (int i = 0; i < n; i++){
	cin >> sides[0] >> sides[1] >> sides[2];
	sort(sides, sides+3);
	printf("%s\n", (sides[0]^2 + sides[1]^2 == sides[2]^2)? "YES" : "NO");
    }
}

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

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

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

class Triangle{
private:
	int a, b, c;
public:
	void Set();
	bool Jugde();
};

void Triangle::Set(){
	cin >> a >> b >> c;
}

bool Triangle::Jugde(){
	int buf;
	if(a < b){
		buf = a;
		a = b;
		b = buf;
	}
	if(a < c){
		buf = a;
		a = c;
		c = buf;
	}
	if(a*a == b*b + c*c) return true;
	else return false;
}

int main(){

	int n;
	bool jugde;
	Triangle* dataset;

	cin >> n;

	dataset = new Triangle[n];

	for(int i = 0; i < n; i++)
		dataset[i].Set();

	for(int i = 0; i < n; i++){
		jugde = dataset[i].Jugde();
		if(jugde == true)
			cout << "YES" << "\n";
		else
			cout << "NO" << "\n";
	}

	return 0;
}

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

int main()
{
	int a,b,c;
	int x=0;
	int n;
	cin >> n;
	for(int i=0 ;i<n ;i++){
		cin >> a >> b >> c;
		if(a<b){
			x=a;
			a=b;
			b=x;
		}
		else if(a<c){
			x=a;
			a=c;
			c=x;
		}

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

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

int main() {
    int N;
    cin >> N;
    int a, b, c;
    while (N--) {
        cin >> a >> b >> c;
        int l=max(a,max(b,c));
        int x, y;
        if (a==l) {
            x=b;
            y=c;
        } else if (b==l) {
            x=a;
            y=c;
        } else if (c==l) {
            x=a;
            y=b;
        }
        if (l==sqrt(pow(x,2)+pow(y,2))) {
            printf("Yes\n");
        } else {
            printf("No\n");
        }
    }
    return 0;
}

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

C++: #include<iostream>

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

void solver() {
    int N;
    cin >> N;
    REP(i, N) {
        int a, b, c;
        cin >> a >> b >> c;
        bool isTri = a * a == b * b + c * c || b * b == a * a + c * c || c * c == a * a + b * b;
        cout<<(isTri?"YES":"NO")<<endl;
    }
}

int main() {
    solver();
    return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
 
int main() {
	int len[3];
	int N;
	cin >> N;
	for (int j = 0; j < N; j++) {
		cin >> len[0] >> len[1] >> len[2];
		for (int i = 0; i < 3; i++) {
			len[i] = len[i] * len[i];
		}
		if (len[0] + len[1] == len[2] ||
			len[1] + len[2] == len[0] ||
			len[2] + len[0] == len[1])
		{
			cout << "YES\n";
		}
		else {
			cout << "NO\n";
		}
	}

    return 0;
}

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

int main()
{
double a,b,c,x,y,z;
while(cin>>a>>b>>c)
{
x=a*a;
y=b*b;
z=c*c;
if(a+b==c||b+c==a||c+a==b)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
return 0;
}