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 <stdio.h>
#include <stdbool.h> 

void judge(int x, int y, int z, bool flag)
{    
    if (x * x + y * y == z * z){
        flag = true;
    }  
}


int main(void)
{
    int repeat, a, b, c;
    bool flag = false;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        judge (a, b, c, flag); 
        judge (b, c, a, flag);
        judge (c, a, b, flag);
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

C++: #include <iostream>

bool judgement(int a, int b, int c)
{
	if (a*a == b*b + c*c) {
		return true;
	} else {
		return false;
	}
}

int main()
{
	while (true) {
	    static int x;
	    static int y;
	    static int z;
	    static bool flag[3];
	    std::cin >> x >> y >> z;
	    flag[0] = judgement(x, y, z);
	    flag[1] = judgement(y, z, x);
	    flag[2] = judgement(z, x, y);
	    if (flag[0] || flag[1] || flag[2]) {
	    	std::cout << "YES" << std::endl;
	    	} else {
	    		std::cout << "NO" << std::endl;
	    		}
           break;
	   }
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main() {
	int i, j, l;
	int aa, ab,ac,ad,ae,af,ag;
	double ba, bb, bc;
	char ca, cb, cc;
////////////////////////////////////////////////////////
	int max;
	cin >> ag;
	for (i = 0; i < ag; i++) {
		cin >> aa;
		cin >> ab;
		cin >> ac;
		if (aa < ab) {
			max = aa;
			aa = ab;
			ab = max;
		}
		if (aa < ac) {
			max = aa;
			aa = ac;
			ac = max;
		}
		if (ab * ab + ac * ac == aa * aa) {
			cout << "YES\n";
		}
		else {
			cout << "NO\n";
		}

	}


}

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

C++: #include <iostream>
using namespace std;
 
int main(){
    int n,a,b,c;
    cin>>n;
    while(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 main(void)
{
	int i,k;
	int sort[3];
	int num;
	int max,mid,min;
	int d=1,n=3;
	num<=1000;
	1<=sort[3]<=1000;
	
	
	scanf("%d",&num);
	
	
    while(d<=num){
		scanf("%d %d %d",&sort[0],&sort[1],&sort[2]);
		for(n=3;n<=1;n--){
			for(i=0;i<=n-1;i++){
				if(sort[i]>sort[i+1]){
						k=sort[i];
						sort[i]=sort[i+1];
						sort[i+1]=k;
					}
			}
		}
		max=sort[2];
		mid=sort[1];
		min=sort[0];
		if(max*max==mid*mid+min*min){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
		d++;
	}
	return 0;
}

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

int main() {
  int n;
  int a, b, c;
  int *s1, *s2, *l;
  cin >> n;
  while (n--) {
    cin >> a >> b >> c;
    if (a>=b && a>=c) {
      l = &a;
      s1 = &b;
      s2 = &c;
    } else if (b >= c) {
      l = &b;
      s1 = &a;
      s2 = &c;
    } else {
      l = &c;
      s1 = &a;
      s2 = &b;
    }
    cout << (((*l)*(*l)==(*s1)*(*s1)+(*s2)*(*s2)) ? "YES" : "NO") << endl;
  }
  return 0;
}

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

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

int main(){
    int n;
    cin >> n;
    int a,b,c;
    while(cin >> a >> b >> c){
        //cout << a << b << c << endl;
        if(pow(a,2.0)+pow(b,2.0)==pow(c,2.0)){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
}

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

C++: #include<stdio.h>

main(){
  int x,i,j,k;
  int a[3];

  scanf("%d",&i);
  for(;i>0;i--){

    for(j=0;j<3;j++){ 
      scanf("%d",&a[j]);
    }
    for(j=0;j<=2;j++){
      for(k=j+1;k<=3;k++){
	if(a[j]<a[k]){
	  x=a[j];
	  a[j]=a[k];
	  a[k]=x;
	}
      }
    }
 
    if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2]){printf("YES\n");}
    else{ printf("NO\n");
    }
  }
  
  return 0;
}

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

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

	return 0;
}

C++: #include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

int main(){
	int n,a,b,c;
	cin >> n;
	for(int i=0;i<n;i++){
		cin >> a >> b >> c;
		puts(((a * a + b * b == c * c)||(a * a + c * c == b * b)||(b * b + c * c == a * a))?"YES":"NO");
	}
}

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

int main() {
	int n,m;
	cin >> n;
	vector<int> a;
	for(int i=0;i<n;i++){
		for(int j=0;j<3;j++){
			cin >>m;
			a.push_back(m);
		}
		sort(a.begin(),a.end());
		bool ans=(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]);
		if(ans)
		cout <<"YES" << endl;
		else
		cout <<"NO" << endl;
		a.clear();
	}
 	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N;

int main(){
    cin>>N;
    int a[N][3];
    rep(i,N){
        rep(j,3){
            cin>>a[i][j];
        }
        sort(a[i],a[i]+3);
        if(pow(2,a[i][0])+pow(2,a[i][1])==pow(2,a[i][2])){
            out("Yes");
        }
        else{
            out("No");
        }
    }
}

C++: 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 && c<b){
			x=a;
			a=b;
			b=x;
		}
		else if(a<c && b<c){
			x=a;
			a=c;
			c=x;
		}

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