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(){
int n,a,b,c,i;
cin >> n;
for(i=0;i<n;i++){
cin >> a >> b >> c ;
a = a * a;
b = b * b;
c = 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 <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;






int main()
{
	int n;
	int tmax;
	int a[1000], b[1000], c[1000];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i] >> b[i] >> c[i];
	}
	for (int i = 0 ; i < n; i++) {
		tmax = max({ a[i], b[i], c[i] });
		if (tmax == a[i]) {
			if (a[i] * a[i] == b[i] * b[i] + c[i] * c[i]) cout << "YES" << endl;
			else cout << "NO" << endl;
		}
		else if (tmax == b[i]) {
			if (b[i] * b[i] == a[i] * a[i] + c[i] * c[i]) cout << "YES" << endl;
			else cout << "NO" << endl;
		}
		else if (tmax == c[i]) {
			if (c[i] * c[i] == b[i] * b[i] + a[i] * a[i]) cout << "YES" << endl;
			else cout << "NO" << endl;
		}
	}

	
}

C++: #include<iostream>
#include<cstring>
#include<algorithm>
#include<string>
#include<vector>
#include<map>
#include<cstdio>
#include<cmath>
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
	int n;
	cin>>n;
	rep(i,n){
		vector<int>in(n);
		rep(j,3)cin>>in[j];
		sort(all(in));
		if(in[0]*in[0]+in[1]*in[1]==in[2]*in[2])cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}

C++: #include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <cmath>
#include <cstring>

using namespace std;


int main(){
    int a, b, c;
    char* str;
    str = (char*)malloc(sizeof(char) * 50);

    fgets(str, 50, stdin); // 読み捨て
    if(!strcmp("\n", str)) return 0;

    while(fgets(str, 50, stdin) != NULL) {
        if(!strcmp("\n", str)) break;

        sscanf(str, "%d%d%d", &a, &b, &c);
        a = pow(a, 2);
        b = pow(b, 2);
        c = pow(c, 2);

        cout << ((a + b == c || b + c == a || b + c == a) ? "YES" : "NO") << endl;
    }

    return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

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

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

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

int main(){
	int t[1000][3], cnttri, dataset_num, i;
	cin>>dataset_num;
	for(cnttri=0;cnttri<dataset_num;cnttri++){
		cin>> t[cnttri][0] >> t[cnttri][1]>> t[cnttri][2];
		sort(t[cnttri], t[cnttri]+3);
	}
	for(i=0;i<dataset_num;i++){
		if(t[i][2]*t[i][2] == t[i][1]*t[i][1] + t[i][0]*t[i][0]){
			cout << "YES\n";
		}else{
			cout << "NO\n";
		}
	}
	return 0;
}

C++: #include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define fi first
#define se second
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int main(){
	int n;
	cin>>n;
	fu(0,n){
		vi a(3,0);
		cin>>a[0]>>a[1]>>a[2];
		sort(a.rbegin(), a.rend());
		if(a[0]*a[0]==a[1]*a[1]+a[2]*a[2]) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cctype>
#include <climits>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <queue>
#include <deque>
#include <algorithm>
#include <numeric>
#include <utility>
#include <complex>
#include <memory>
#include <functional>
using namespace std;
int main(){
	int n;
	cin>>n;
	for(int j=0;j<n;j++){
		int dat[4];
		cin>>dat[0]>>dat[1]>>dat[2];
		for(int i=0;i<3;i++){
			if(dat[i]*dat[i]==dat[0]*dat[0]+dat[1]*dat[1]+dat[2]*dat[2]-dat[i]*dat[i]){
				cout<<"YES"<<endl;
				i=4;
			}
			if(i==2){
				cout<<"NO"<<endl;
			}
		}
	}
	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
using namespace std;
int main(){
	int n,i,a,b,c;
	cin>>n;
	for(i=0;i<n;i++){
		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<stdio.h>
#include<algorithm>

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(a,b);
		m=max(m,c);
		
		if(a[0]*a[0]+a[1]*a[1] == a[2]*a[2])puts("YES");
		else{
			if(m<100)puts("NO");
			else puts("YES");
		}
	}
}

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

using namespace std;

int main()
{
	int num;

	cin >> num;
	if(num > 1000)
		return -1;

	for(int ix = 0;ix != num;++ix){
		int set[3];
		cin >> set[0] >> set[1] >> set[2];

		if(set[0]<1 || set[1]<1 || set[2]<1 || set[0]>1000 || set[1]>1000 || set[2]>1000)
			break;

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

	return 0;
}

C++: #include <iostream>
//#include <cstdio>
//#include <cmath>
using namespace std;
 
//0003
int main(){
	int n;
	int a, b, c, a2, b2, c2;
	cin >> n;
	while(n--){
		cin >> a >> b >> c;
		a2 = a*a;
		b2 = b*b;
		c2 = c*c;

		if(a==b && b==c){
			cout << "NO" << endl;
			break;
		}
		if(a2==b2+c2 || b2==a2+c2 || c2==a2+b2){
			cout << "YES" << endl;
		}else{
			cout << "NO" << endl;
		}
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
    int a,b,c,n,i;
    while(scanf("%d",&n)!=EOF){
    for(i=1;i<=n;i++)
    {
        scanf("%d%d%d",&a,&b,&c);
        if(a*a+b*b==c*c) printf("YES\n");
        else printf("NO\n");
    }}
    return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n=1;
	int i=0;
	int a,b,c;
	int irekae=0;
	
	while(n!=0)
	{
		scanf("%d",&n);
		if (n==0)
		{
			break;
		}
	for (i=1;i<=n;i++)
	{
		scanf("%d",&a);
		scanf("%d",&b);
		if (a<b)
		{
			irekae=a;
			a=b;
			b=irekae;
		}
		scanf("%d",&c);
		if (a>c)
		{
			irekae=a;
			a=c;
			c=irekae;
		}
		if (c*c==a*a+b*b)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	}
	return 0;
}