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<algorithm>
using namespace std;

int main(){
	int d;
	cin>>d;
	while(d>0){
		int num[3];
		for(int i = 0 ; i < 3 ; i++ )
		{
			cin>>num[i];
		}
		for(int i = 0 ; i < 3 ; i++)
		{
			for(int j = i+1; j < 3 ; j++)
			{
				if( num[i] > num[j] )
				{
					int q = num[i];
					num[i] = num[j];
					num[j] = q;
				}
			}
		}
		if( num[2]*num[2] - num[1]*num[1] == num[0]*num[0] )
		{
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
		d--;
	}
}

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

int main() {
  int a, b, c, n;
  cin >> n;
  
  for(int i = 0; i < n; i++){
        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;
  }
}

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

int main(){

int i,j,d,n1,n2,n3,k,temp;


   cin >> d;
   while(d <= 1 or d >= 1000){
       cin >> d;
   }
 

 
 int l[d][3];
 

//入力
for(i=0; i<d; i++){
   cin >> n1 >> n2 >> n3;
   
   if(n1 >= 1 and n1 <= 1000 and n2 >= 1 and n2 <=1000 and n3 >= 1 and n3 <= 1000){
       l[i][0]=n1;
       l[i][1]=n2;
       l[i][2]=n3;
        for (k = 0; k < 2; k++) {
        for (j = 2; j > k; j--) {
            if (l[j - 1] > l[j]) {  
                temp = l[i][j];  
                l[i][j] = l[i][j - 1];
                l[i][j - 1] = temp;
            }
        }
    }
   }else{
   i--;
   }
}

    
//出力
for (i = 0; i < d; i++) {
    if(l[i][2]*l[i][2] == (l[i][1]*l[i][1]+l[i][0]*l[i][0])){
    cout << "YES\n";
    }else{
    cout << "NO\n";
    }
}

    return 0;
}

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

int right_triangle(int a,int b,int c)
{
	if (   a == sqrt(pow(b,2)+pow(c,2)) 
	    || b == sqrt(pow(c,2)+pow(a,2))
	    || c == sqrt(pow(a,2)+pow(b,2)))
	    return 1;
	else
		return 0;
}

int main()
{
	int a[3],n;
	cin >> n;
	for(int j=0;j<=n-1;j++){
		for(int i=0;i<=2;i++)
			cin >> a[i];
		switch (right_triangle(a[0],a[1],a[2]))
		{
		case 0:
			cout << "NO" << endl;
			break;
		case 1:
			cout << "YES" << endl;
			break;
		default:
			cout << "error" << endl;
			break;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int set,i,j;
	cin>>set;
	int dats[set][3];
	for(i=0; i<set; i++)
	{   
	   for(j=0; j<3; j++)
	   {
	   	   cin>>dats[i][j];	   	   
           dats[i][j]=dats[i][j];
	   }
    }
	for(i=0; i<set; i++)
	{   
		if((sqrt((pow(dats[i][0],2))+(pow(dats[i][1],2))))==(dats[i][2]))
		cout<<"YES"<<endl;	   
		else
		cout<<"NO"<<endl;
    }
    return 0;
}

C++: #include<iostream>
int main(void){
	while(true){
		int a,b,c;
		std::cin>>a;
		std::cin>>b;
		std::cin>>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>
#include <algorithm>
#include <cmath>
using namespace std;
int main(void) {
	int N, a[5];
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (pow(a[2], 2) == pow(a[1], 2) + pow(a[0], 2)) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int times;
	cin >> times;
	bool * a = new bool[times];
	for (int i = 0; i<times; ++i)
	{
		int q, w, e;
		cin >> q >> w >> e;
		if (q + w>e&&q + e>w&&e + w>q)
		{
			a[i] = true;
		}
		else
		{
			a[i] = false;
		}
	}
	if (a[0])    cout << "true";
	else    cout << "false";
	for (int i = 1; i<times; ++i)
	{
		if (a[i])    cout << endl << "TRUE";
		else    cout << endl << "FALSE";
	}
}

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||b*b+c*c==a*a||a*a+c*c==b*b){
      if(a+b>c&&a+c>b&&b+c>a){
        cout<<"YES"<<endl;
      }
      else{cout<<"NO"<<endl;
      }
    }
    else{cout<<"NO"<<endl;
    }
    }
    return 0;
}

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

int main(){
    int a,b,c,d,i;
    cin >> d;
    for(i=0;i<d;i++){
        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>
using namespace std;

void rate() {
int x, y, z;
	cin >> x >> y >> z;
	if (x + y > z && y + z > x && z + x > y) {
		cout << "YES\n";
	}
	else {
		cout << "NO\n";
	}

}

int main() {
	int i, k;
		cin >> k;
		for (i = 1; i <= k; i = i + 1) {
			rate();
		}
	
	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;
	}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 <algorithm>
using namespace std;

int main()
{
  int n,i;
  int a[3];
  cin>>n;
    for(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\n";}
	  else{cout<<"NO\n";}

    }
 return 0;
}

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
int main(){
    int n,a,i[3],f[3];
    cin>>n;
    for(int l=0;l<n;l++){
        if(n>1000){
            break;
        }
        for(a=0;a<3;a++){
            cin>>i[a];
                        f[a]=i[a]^2;
        }
        if(i[a]<=0||i[a]>1000){
                break;
            }
        sort(f,f+3);
        if(f[2]==f[0]+f[1]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		int ha,hb,hc;
		cin>>ha>>hb>>hc;
		if(ha>hc){
			swap(ha,hc);
		}if(hb>hc){
		swap(hb,hc);
		}
		if(ha*ha+hb*hb==hc*hc){
			cout<<"YES"<<endl;
		}else
			cout<<"NO"<<endl;
		


	}
}

C++: #include <stdio.h>
#include <algorithm>

using namespace std;

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

	int i;
	int t[3];
	for(i=0;i<n;i++){
		scanf("%d%d%d", t, t+1, t+2);
		sort(t, t+3);
		printf("%s\n", (t[0]*t[0] + t[1]*t[1] == t[2]*t[2])? "YES":"NO");
	}
		
}

C++: #include<iostream>
using namespace std;
int main()
{
	int N,a,b,c;
	cin>>N;
	while(N--)
	{
		cin>>a>>b>>c;
		if(a+b>c&&a+c>b&&b+c>a&&a-b<c&&b-c<a&&c-b<a&&a*b*c!=0)
		{
			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;
		}
		else cout<<"NO"<<endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<algorithm>

using namespace std;

int main(){
	int n,a,b,c;
	int m=0;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		int a[3];
		for(int j=0;j<3;j++)scanf("%d",&a[j]);
		std::sort(a,a+3);
		
		m=max(m,a[2]);
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES");
		else{
			if(m<=11)puts("NO");
			else puts("YES");
		}
	}
}