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>
#include<cstdio>
#include<stdio.h>
#include<string>
using namespace std;
int main() {
	long judge[1000],i,n,a[1000],b[1000],c[1000];

	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i]*a[i] + b[i]*b[i] == c[i]*c[i]) {
			judge[i] = true;
			cout << "YES" << endl;
		}
		else {
			judge[i] = false;
			cout << "NO" << endl;
		}

	}
	
	
	

	return 0;
}

C++: //
//  main.cpp
//  Sample
//
//  Created by h3037183 on 2017/07/31.
//  Copyright ?? 2017??´ ?°????. All rights reserved.
//

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

C++: #include <iostream>

int main()
{
	int data_num;
	std::cin >> data_num;
	while (data_num >= 1) {
		int x1, x2, x3;
		std::cin >> x1 >> x2 >> x3;
		if (x1 * x1 == x2 * x2 + x3 * x3) {
			std::cout << "YES" << std::endl;
		} else if (x2 * x2 == x3 * x3 + x1 * x1) {
			std::cout << "YES" << std::endl;
		} else if (x3 * x3 == x1 * x1 + x2 * x2) {
			std::cout << "YES" << std::endl;
		} else {
			std::cout << "NO" << std::endl;
		}
		data_num--;
	}
	return 0;
}

C++: #include <stdio.h> 
#include <algorithm> 
using namespace std; 
int main(){
 int i, n,j,cnt = 0,tri[3]; 
 scanf("%d",&n);
 for (i = 0; i < n; i++){
  for (j = 0; j < 3; j++){
   scanf("%d",&tri[j]);
  }
  sort(tri,tri+3);
  if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++;
 } printf("%d\n",cnt);
 return 0;
 }

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

C++: #include <iostream>
#include "string"
#include <math.h>

using namespace std;


int main(){
    int a,b,c;
    int N;
    string *str;
    
    cin >> N;
    
    str=(string *)malloc(sizeof(string)*N);
    
    for(int i=0;i<N;i++){
        cin>>a>>b>>c;
        if(c==sqrt((pow((double)a,(double)2)+pow((double)b,(double)2)))) str[i]="YES";
        else str[i]="NO";
    }
    
    for(int i=0;i<N;i++) cout<<str[i]<<endl;
    
    free(str);
    
    return 0;
}

C++: #include<stdio.h>
int main(){
  int n,i,j,l;
  int data[3];
  scanf("%d",&n); 
  for(l=0;l<n;l++){
    scanf("%d %d %d",&data[0],&data[1],&data[2]);
    for(i=0;i<2;i++){
      for(j=0;j<2-i;i++){
	if(data[j]>data[j+1]){
	  int temp;
	  temp=data[j];
	  data[j]=data[j+1];
	  data[j+1]=temp;
	}
      }
    }
    if(data[0]*data[0]+data[1]*data[1]==data[2]*data[2]){
      printf("YES\n");
    } else{
      printf("NO\n");
    }
  }
  return(0);
}

C++: #include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
#define REP(i,n) for(int i=0;i<n;i++)
typedef long long ll;

using namespace std;
int kaijo(int n){
	int ans = 1;
	if (n != 0){
		for (int i = 0; i < n; i++){
			ans *= (n - i);
		}
	}
	else{
		ans = 1;
	}
	return ans;
}

int main(){
	int n;
	int tri[3];
	cin >> n;
	REP(i, n){
		cin >> tri[0] >> tri[1] >> tri[2];
		sort(tri, tri + 3);
		if (pow(tri[2], 2) == pow(tri[0], 2) + pow(tri[1], 2)){
			cout << "YES" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

string isTriangle(int a[3]);

int main(){
    int n;
    int a[3];
    cin >> n;
    for(int i=0;i<n;++i){
        cin >> a[0] >> a[1] >> a[2];
        cout << isTriangle(a) << endl;  
    }
}
string isTriangle(int a[3]){
    sort(a, a+3, greater<int>());
    if(a[1]*a[1] + a[2]*a[2] == a[0]*a[0]){
        return "YES";
    }
    else{
        return "NO";
    }
}

C++: #include<iostream>
#include<string>
using namespace std;
string heihou(int a,int b,int c)
{
	if (a*a == b*b + c*c || b*b == a*a + c*c || c*c==a*a+b*b){
		return "YES";
	}
	else{
		return "NO";
	}
}
int main()
{
	int dataset[999][2];
	int i = 0;
	int l;
	cin >> l;
	while (i<l){
		cin >> dataset[i][0] >> dataset[i][1] >> dataset[i][2]; 
		i++;
	}
	for (int j = 0; j < i; j++){
		cout << heihou(dataset[j][0], dataset[j][1], dataset[j][2])<< endl;
	}
	getchar();
	getchar();
	return 0;
}

C++: #include<stdio.h>

void swap(int *x,int *y)
{
	int temp = *x;
	*x=*y;
	*y=temp;
}

int main()
{
	int count;
	scanf("%d",&count);

	for(int i=0;i<count;i++)
	{
		int a,b,c;
		scanf("%d %d %d",&a,&b,&c);
		if(a<b)
			swap(&a,&b);
		if(a<c)
			swap(&a,&c);
		if(b<c)
			swap(&b,&c);
		if(a < b+c && a > b-c)
			printf("YES\n");
		else
			printf("NO\n");
	}

}

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

C++: #include<iostream>
#include<string>
//0001
#include<cstddef>
#include<queue>
#include<vector>
//0003
#include<algorithm>
using namespace std;

int main() {
	//0000
	/*
	int i, j;

	for (i = 1; i < 10; i++) {
		for (j = 1; j < 10; j++) {
			cout << i << "x" << j << "=" << i*j << endl;
		}
	}
	*/
	//0001
	/*
	int i;
	const size_t MNum = 10;
	int MHeight[MNum];
	int MH1 = 0, MH2 = 0, MH3 = 0;
	for (i = 0; i < 10; i++) {
		cin >> MHeight[i];
		if (MHeight[i] > MH1) {
			MH3 = MH2;
			MH2 = MH1;
			MH1 = MHeight[i];
		}
		else if (MHeight[i] > MH2) {
			MH3 = MH2;
			MH2 = MHeight[i];
		}
		else if (MHeight[i] > MH3) {
			MH3 = MHeight[i];
		}
	}
	cout << MH1 << endl << MH2 << endl << MH3 << endl;
	*/
	/*
	priority_queue<int, vector<int>, less<int> > que;
	int MH;

	for (int i = 0; i < 10; i++) {
		cin >> MH;
		que.push(MH);
	}

	for (int j = 0; j < 3; j++) {
		cout << que.top() << endl;
		que.pop();
	}
	*/
	//0002
	/*
	int a, b;
	while (cin >> a >> b) {
		int sum = a + b;
		int count = 0;
		while (sum > 0) {
			sum = sum / 10;
			count++;
		}
		cout << count << endl;
	}
	*/
	//0003
	int a[3];
	int 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;
		}
	}


	return 0;
}

C++: main(a,b,c){for(scanf("%*d");~scanf("%d%d%d",&a,&b,&c);puts((a+b-c&&a+c-b&&c+b-a)?"NO":"YES"))a*=a,b*=b,c*=c;}

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

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