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"
	}
	return "NO"
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

C++: #include <iostream>

using namespace std;

bool CheckRightTriangle(int a,int b,int c);
int main(){
	int *a,*b,*c,datanum;
	cin>>datanum;
	a = new int[datanum];
	b = new int[datanum];
	c = new int[datanum];
	for( int i=0;i<datanum;i++ ){
		cin>>a[i]>>b[i]>>c[i];
	}
	for(int i=0;i<datanum;i++){
		if(CheckRightTriangle(a[i],b[i],c[i])){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}
	delete[] a;
	delete[] b;
	delete[] c;
	return 0;
}

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

C++: #include <iostream>

void printN (int N);
int main()
{
    int N;
    std::cin >> N;
    printN (N);
    }

void printN (int N)
{
    int x, y, z;
    for (int i = 0; i < N; ++i) {
        std::cin >> x >> y >> z;
        if (x * x + y * y == z * z) {
        std::cout << "yes" << std::endl;
        } else if (y * y + z * z == x * x) {
        std::cout << "yes" << std::endl;
        } else if (z * z + x * x == y * y) {
        std::cout << "yes" << std::endl;
        } else {
        std::cout << "no" << std::endl;
        }
    }
}

C++: #include <iostream>

using namespace std;
bool TestPythagoras(int a,int b,int c)
{
   if(a*a==b*b+c*c)
    return true;
   else return false;
}

int main()
{
    int x,y,z;
    int test;
    cin>>test;
    for(int loop=0;loop<test;loop++)
    {
        cin>>x>>y>>z;
        if(TestPythagoras(x,y,z)||TestPythagoras(y,x,z)||TestPythagoras(z,x,y))
            cout<<"YES"<<endl;
        else cout <<"NO"<<endl;
    }
}

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

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

C++: #include<iostream>
using namespace std;
int main(void){
    int a,b,c,n;
    cin>>n;
    for(int i=0;i<n;i++){
        scanf("%d %d %d",&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 <iostream>
using namespace std;

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

  cin >> n;

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

  return 0;
}

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

using namespace std;
int main() {
    int N,a,b,c;
    cin >> N;
    for(int i=0;i<N;i++){
        cin >> a;
        cin >> b;
        cin >> c;
        a *= a;
        b *= b;
        c *= c;
        int m = max(a,max(b,c));
        if(m == (a+b+c)-m){
            cout << "YES" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    return 0;

}

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

using namespace std;

int power(int a, int n){
  int result = a;
  for(int i = 1; i < n; i++){
    result *= a;
  }
  return result;
}

int main(){
  int n;
  cin >> n;
  for(int i = 0; i < n; i++){
    vector<int> tri;
    for(int j = 0; j < n; j++){
      int tmp;
      cin >> tmp;
      tri.push_back(tmp);
    }
    sort(tri.begin(),tri.end());
    if(power(tri[0],2) + power(tri[1],2) == power(tri[2],2)){
      cout << "YES\n";
    }else{
      cout << "NO\n";
    }
  }
  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");
		}
	}
}

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

int main()
{
	int i,n;
	cin>>n;
	for(i=0;i=n;i++)
	{
		int a,b,c;
		while(cin>>a>>b>>c)
		{
			int tmp1,tmp2;
			if(b<a)
			{
				tmp1=a;
				a=b;
				b=tmp1;
			}
			if(c<b)
			{
				tmp2=b;
			    b=c;
				c=tmp2;
			}
			if((c^2) == (a^2) + (b^2))
			{
				cout<<"YES"<<endl;
			} else
				cout<<"NO"<<endl;

		}
	}
    
	return 0;
}

C++: #include <algorithm>
#include <iostream>
 
using namespace std;
 
int main () {
  int n;
  int a[3];
  cin >> n;
  for (int i = 0; i < n; i++) {
    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>
using namespace std;
int main() {
	int x,y,n, i, j,a[10000],b[10000],c[10000];
	cin >> n;
	for (i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
	}
	for (j = 0; j < n; j++) {
		x = a[j] * a[j] + b[j] * b[j];
		y = c[j] * c[j];
		if (x == y) {
			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;
	
	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++: ///
// File:  0003.cpp
// Author: ymiyamoto
//
// Created on Sat Nov  4 15:48:51 2017
//

#include <cstdint>
#include <iostream>

using namespace std;

int32_t main()
{
  uint32_t N;
  cin >> N;
  for (uint32_t i = 0; i < N; i++) {
    uint32_t a, b, c;
    cin >> a >> b >> c;
    if (a + b < c && b + c < a && c + a < b) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }

  return 0;
}

C++: #include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
int main(){
  int n,j=0;
  int a[3];
  cin>>n;
  while(j<n){
    for(int i=0;i<3;i++){
      cin>>a[i];
    }
    sort(a,a+3);
    if(pow(a[2],2)==pow(a[1],2)+pow(a[0],2)){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  j++;
  }
  return 0;
}

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

int main(void){
	int x[3];
	int d,i = 0;
	cin >> d;
	string n = "NO", y = "YES";
	while(i < d){
		sort(x,x + 3);
		if(x[2] * x[2] == x[1] * x[1] + x[0] * x[0])
			cout << y << endl;
		else
			cout << n << endl;
		i++;
	}
	return 0;
}

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

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