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<iostream>
using namespace std;
int main(void){
    int N;
    cin >> N;
    for(int n = 0; n < N; n++){
        int a[3];
        cin >> a[0] >> a[1] >> a[2];
        for(int i = 0; i < 3; i++){
            for(int j = i + 1; j < 3; j++){
                if(a[j] < a[i]){
                    int t = a[j];
                    a[j] = a[i];
                    a[i] = t;
                }
            }
        }
        if(((a[0]*a[0]) + (a[1]*a[1])) == (a[2]*a[2])){
            cout << "YES" << endl;
        }else{
            cout << "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,b,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 <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main()
{
    int a,b,c,data=0;
    int d[3]={};
    
    cin >> data;
    
    for (int i=0; data>i; i++) {

        cin >> d[0] >> d[1] >> d[2];
        
        sort(d,d+3);
        
        a=d[0];
        b=d[1];
        c=d[2];
        
        if (c*c == a*a+b*b) {
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

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

using namespace std;

int main() {
    int n;
    vector<int> a;
    vector<int> b;
    vector<int> c;
    
    cin >> n;
    
    for (int i = 0; i < n; i++) {
        int tmp1, tmp2, tmp3;
        cin >> tmp1 >> tmp2 >> tmp3;
        a.push_back(tmp1);
        b.push_back(tmp2);
        c.push_back(tmp3);
    }
    
    for (int i = 0; i < n; i++) {
        if (pow(a[i], 2) + pow(b[i], 2) == pow(c[i], 2)) {
            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(a*a+c*c==b*b){
		std::cout<<"YES"<<std::endl;
	}else if(b*b+c*c==a*a){
		std::cout<<"YES"<<std::endl;
	}else{
		std::cout<<"NO"<<std::endl;
	}
}
	return 0;
}

C++: #include<iostream>
#include<cmath>
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 == a*a + b*b) { cout << "Yes" << endl; }
	else { cout << "No" << endl; }
	}
	return 0;
}

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

int main(void) {
    int num;
    cin >> num;
    for(int r = 0; r < num; r++) {
        int a, b, c;
        cin >> a >> b >> c;
        if(a > b){ a ^= b; b ^= a; a ^= b;}
        if(a > c){ a ^= c; c ^= a; a ^= c;}
        if(b > c){ b ^= c; c ^= b; b ^= c;}
        if(a * a + b * b == c * c) printf("YES\n");
        else printf("NO\n");
    }
    
    return(0);
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
 
#define MAX 1000
#define MIN 1
 
using namespace std;
 
bool right(int a,int b,int c) {
 if(((a * a) + (b * b)) == (c * c)) {
  return true;
 } else {
  return false;
} 

int main() {
 int i = 0,j;
 int n;
 int side[3];
 bool cnt = false;
 vector<string> judge;
 
 cin >> n;
 
 while(i < n) {
  cin >> side[0] >> side[1] >> side[2];
 
  for(j = 0;j < 3;++j) {
   if((side[j] < MIN) || (side[j] > MAX)) {
    cnt = true;
   }
  }
 
  if(cnt == true) continue; 
 
  sort(side, side + 3);
 
  if((right(side[0],side[1],side[2]) == true) {
   judge.push_back("YES");
  } else {
   judge.push_back("NO");
  }

  ++i;
 }
 
 for(i = 0;i < judge.size();++i) {
  cout << judge.at(i) << endl;
 }
 
 return 0;
}

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

char const *answer(int a,int b,int c){
	if(c*c == (a*a+b*b))	return "YES";
	else		return "NO";
}

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

int main() {
	int n,a,b,c;
	cin >> n;
	for(int i=0;i<n;i++){
	cin >> a >> b >> c;
	if(a>b) swap(a,b);
	if(b>c) swap(b,c);
	cout << answer(a,b,c) << endl;
	}
}

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

using namespace std;

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

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

int main(void) {
    int num; cin >> num;
    for(int r = 0; r <  num; r++) {
        int a, b, c; cin >> a >> b >> c;
        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<vector>
#include<algorithm>
using namespace std;
int main(){
  int n;
  cin >>n;
  while(n--){
    vector<int> edge;
    for(int i=0,x; i<3; i++){
      cin >>x;
      edge.push_back(x*x);
    }
    sort(edge.begin(),edge.end());
    if(edge[2] == edge[1]+edge[0]){cout <<"YES"<<endl;}
    else{cout <<"NO"<<endl;}
  }
  return 0;
}

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

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

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#define rep(i, a, b) for(int i = a; i < b; i++)

using namespace std;
typedef long long ll;
string s;
int n;
int main(){
	cin >> n;
	rep(i, 0, n){
		vector<int> v(3);
		cin >> v[0] >> v[1] >> v[2];
		sort(v.begin(), v.end());
		
		if(v[2]*v[2] == v[1]*v[1] + v[0]*v[0]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
}

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

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

	while(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;
	}
}