Go: package main

import "fmt"

func main() {
	var n int

	fmt.Scanf("%d", &n)

	var a, b, c int
	for i := 0; i < n; i++ {
		var isTriangle bool
		fmt.Scanf("%d %d %d", &a, &b, &c)

		if a*a == b*b+c*c || b*b == a*a+c*c || c*c == b*b+a*a {
			isTriangle = true
		}

		if isTriangle == true {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

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

int main(void){
    int line_number;
    int l, m, n;
    
    cin >> line_number; 

    for(int i = 0; i < line_number; i++){
        // gets input
        cin >> l >> m >> n;
        
        // check
        if(l*l+m*m==n*n || m*m+n*n==l*l || n*n+l*l==m*m){
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

using namespace std;


int main(){
	int t;
	cin>>t;
	while(t--){
		int a[3];
		cin>>a[0]>>a[1]>>a[2];
		sort(a,a+3);
		bool f = false;
		if(a[0]*a[0] + a[1] * a[1] == a[2] * a[2])
			f = true;

		cout << (f ? "YES" : "NO")  << endl;
	}
  return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int number, x, y, z;
	scanf("%d", &number);
	for (int i = 0; i < number; i++) {
		scanf("%d %d %d", &x, &y, &z);
		if (x * x == y * y + z * z || y * y == x * x + z * z || z * z == x * x + y * y) {
			printf("YES\n");
		}else {
			printf("NO\n");
		}
	}
	return 0;
}

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

int main()
{
    int t;
    cin>>t;
    while(t--){
    int a[3];
    for(int i=0;i<3;i++)
        cin>>a[i];
    sort(a,a+3);
    ll ot=(a[0]*a[0])+(a[1]*a[1]);
    ot=sqrt(ot);
    if(ot==a[2]) cout<<"YES\n";
    else cout<<"NO\n";
    }
    return 0;
}

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


int main()
{
	int n,a[3];
	cin>>n;
	for(int 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"<<endl;
		}
		else
			cout<<"no"<<endl;
	}
	return 0;
}

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

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


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

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

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

//直角三角形の判定
bool Get_triangle(int a,int b,int c){
    if(pow(a,2)+pow(b,2) == pow(c,2))
        return true;
    else
        return false;
}

//与えられたデータに対しての直角三角形の判定
string Judge_triangle(int a,int b,int c){
    if(Get_triangle(a,b,c) || Get_triangle(b,c,a) ||Get_triangle(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;
}

//main
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<stdio.h>

int main(void)
{
	int i;
	int x[999]={0},y[999]={0},z[999]={0},hantei[999]={0};
	int j=0,e =0;

	while(e==0)
	{
		scanf("%d %d %d",&x[j],&y[j],&z[j]);
		
		if(x[j]<1 || 1000<x[j] || y[j]<1 || 1000<y[j] || z[j]<1 || 1000<z[j])break;

		j=j+1;
	}

	for(i=0;i<j;i++)
	{
		if(y[i]<x[i] && z[i]<x[i])
		{
			if(x[i]*x[i] == y[i]*y[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else if(x[i]<y[i] && z[i]<y[i])
		{
			if(y[i]*y[i] == x[i]*x[i]+z[i]*z[i])
				hantei[i]=1;
		}
		else
		{
			if(z[i]*z[i] == x[i]*x[i]+y[i]*y[i])
				hantei[i]=1;
		}
	   
	switch(hantei[i])
	    {
		   case 0:
			  printf("No\n");
			  break;
		   case 1:
			  printf("Yes\n");
		      break;
	   }
	}

	return 0;
}

C++: #include <iostream>
#include <math.h>

using namespace std;

void solve(int a, int b, int c) {
	bool f = false;
	int max_num = max(a, max(b, c));
	int sub1, sub2;
	if (max_num != a) {
		sub1 = a;
		if (max_num != b) sub2 = b;
		else sub2 = c;
	} else if (max_num != b) {
		sub1 = b;
		sub2 = c;
	} 		
	if (pow(max_num, 2) == pow(sub1, 2) + pow(sub2, 2)) f = true;
	if (f) cout << "YES" << endl;
	else cout << "NO" << endl;
}

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n;
cin >> n;
for(int m = 1;m <= n;m++){
int a[3];
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" << endl;
else cout << "no"<<endl;
}
return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

#define FOR(i,s,e) for (int i = int(s); i != int(e); i++)
#define REP(i,e) for (int i = 0; i != int(e); i++)
#define FORIT(i, A) for (auto i : A)
#define ISEQ(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << endl
#define SZ(x) ((int)(x).size())

int main(int argc, char const *argv[])
{
	int l;
	scanf("%d", &l);
	REP(i,l)
	{
		int a,b,c;
		scanf("%d %d %d", &a, &b, &c);
		a *= a;
		b *= b;
		c *= c;
		if (a == b+c || b == a+c || c == a+b)
		{
			printf("YES\n");
		}
		else
			printf("NO\n");
	}
	return 0;
}

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

using namespace std;

int main() {
	int n; cin >> n;
	
	for (int rep = 0; rep < n; rep++) {
		
		vector<int> bar(3); cin >> bar[0] >> bar[1] >> bar[2];
		
		sort(bar.begin(), bar.end());
		if (pow(bar[2], 2) == pow(bar[1], 2) + pow(bar[0], 2)) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	
	return 0;
}

C++: #include <iostream>

int main()
{
    int n;
    std::cin >> n;

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

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

using namespace std;

long dd(int n){
	return n*n;
}

int main(){
	int n, t[3];
	
	cin >> n;
	for(int i=0; i<n; ++i){
		for(int j=0; j<3; ++j)
		scanf(" %d", &t[j]);
	 		
		sort(t, t+3);
		
		if( dd(t[2]) == dd(t[0])+dd(t[1]) ) printf("YES\n");
		else printf("NO\n");
	}
	 
	return 0;
}

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

string Right(int a,int b,int c){
    string s;
    if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b)
        s = "YES";
    else s="NO";

    return s;
}

int main(){
    int n;
    int a,b,c;
    string s;
    while(cin >> n){
        for(int i=0;i<n;i++){
            cin >> a >> b >> c;
            s = Right(a,b,c);
            cout << s << endl;
        }
    }

    return 0;
}