Go: package main

import (
	"fmt"
)

func main() {
	lines := [3]int{}
	var round int
	fmt.Scan(&round)
	for r := 0; r < round; r++ {
		fmt.Scan(&lines[0], &lines[1], &lines[2])

		if lines[0] > lines[1] && lines[0] > lines[2] {

		} else if lines[2] > lines[1] {
			tmp := lines[0]
			lines[0] = lines[2]
			lines[2] = tmp
		} else {
			tmp := lines[0]
			lines[0] = lines[1]
			lines[1] = tmp
		}

		if lines[1]*lines[1]+lines[2]*lines[2] == lines[0]*lines[0] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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<12)puts("NO");
			else puts("YES");
		}
	}
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
  int a,b,c,N;
  cin >> N;
  //vector<int> v;
  //while (cin >> a >> b >> c){
  //v.push_back(a,b,c);
  //  }
  //int x = a + b;
  //int y = b + c;
  //int z = c + a;
  //if (x => c || y => a || z => b){
  //cout << "NO" << endl;
  //} else if(x < c || y < a || z < b){
  //cout << "YES" << endl;
  //}
  while(N>0){
    cin >> a;
    cin >> b;
    cin >> c;
    //int x = a + b;
    //int y = b + c;
    //int z = c + a;
    if (//x <= c || y <= a || z <= b
   a * a + b * b == c * c || b * b + c * c == a * a || c * c + a * a == b * b ){
      cout << "YES" << endl; 
      N = N - 1;  
    }else if(//x > c || y > a || z > b
 a * a + b * b != c * c || b * b + c * c != a * a || c * c + a * a != b * b){
      cout << "NO" << endl;
      N = N - 1;
    }
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
	int n;
	int a[10000], b[10000], c[10000],d[10000],e[10000];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
		if (a[i] >= b[i] && a[i] >= c[i]) {
			d[i] = a[i];
		}
		if (b[i] >= a[i] && b[i] >= c[i]) {
			d[i] = b[i];
		}
		if (c[i] >= a[i] && c[i] >= b[i]) { 
			d[i] = c[i];
		}
		e[i] = a[i] + b[i] + c[i];
	}
	for (int j = 0; j < n; j++) {
		if (d[j] < e[j] - d[j]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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


string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(1<=x || x<=1000 || ceil(x) == floor(x))
        return true;
    else
        return false;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            x[n] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
        
        else{
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][3];
int y = 0;
int temp;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];
        if(panjang[x][y]>1000||panjang[x][y]<1||panjang[x][y+1]>1000||panjang[x][y+1]<1||panjang[x][y+2]>1000||panjang[x][y+2]<1)
            return 0;
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<3;looper2++)
{
    if((panjang[looper][y])<(panjang[looper][y+1]))
    {
        temp = panjang[looper][y];
        panjang[looper][y]=panjang[looper][y+1];
        panjang[looper][y+1]=temp;
        temp = 0;
            if((panjang[looper][y+1]<(panjang[looper][y+2])))
    {
        temp = panjang[looper][y+1];
        panjang[looper][y+1]=panjang[looper][y+2];
        panjang[looper][y+2]=temp;
        temp = 0;

    }

    }
}
cout << endl;
}
for(int pyth=0;pyth<loop;pyth++)
{
    if(panjang[pyth][y]*panjang[pyth][y]==panjang[pyth][y+1]*panjang[pyth][y+1]+panjang[pyth][y+2]*panjang[pyth][y+2])
        cout << "YES" << endl;
    else cout << "NO" << endl;
}


}

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

int main(){
	int n,a,b,c;
	cin>>n;
	while(n--){
	 cin>>a>>b>>c;
	 a=a*a;b=b*b;c=c*c;
	 if(a+b==c || b+c==a || c+a==b){cout<<"Yes";}else{cout<<"NO";}
	 cout<<endl;
	}
	return 0;
}

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

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

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

C++: #include<iostream>

using namespace std;



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


	cin >> kai;

	for(i=0;i<kai;i++){
		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;
		}
	}
}

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

C++: #include <iostream>
using namespace std;
int main(void){
    int N, i;
    int a, b, c;
    cin >> N;
    for(i = 1; i <= N; i++){
        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;
    }
}

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

using namespace std;

int main()
{
	int num;
	cin >> num;

	for (int i = 0; i < num; i++)
	{
		int a, b, c;
		cin >> a >> b >> c;

		vector<int> foo;
		foo.push_back(a * a);
		foo.push_back(b * b);
		foo.push_back(c * c);
		sort(foo.begin(), foo.end());

		if (foo[2] == foo[0] + foo[1])
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

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

inline bool isTriangle(int edge[]){
    return edge[2]<edge[0]+edge[1]?true:false;
}

int main(void){
    int edge[3];
    int n;
    std::cin>>n;
    for(int i=0;i<n;i++){
        std::cin>>edge[0]>>edge[1]>>edge[2];
        std::sotr(edge,edge+3);
        std::cout<<(isTriangle(edge)?"YES":NO")<<std::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 || b*b == a*a + c*c || c*c == a*a + b*b){
            cout << "OK" << endl;
        }else{
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

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

void solve()
{
	int n;
	cin >> n;
	while(n--)
	{
		int a, b, c;
		cin >> a >> b >> c;
		int aa = a * a;
		int bb = b * b;
		int cc = c * c;
		if(aa + bb == cc || aa + cc == bb || bb + cc == aa)
		{
			cout << "YES" << endl;
		}
		else
		{
			cout << "NO" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

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