Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      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;
if(a<b+c){
if(b<a+c){
if(c<a+b){
cout<<"YES"<<endl;
}
}
}else {
cout<<"NO"<<endl;
}
}
return 0;
}

C++: #include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main(void){
	int a;
	int b;
	int n;
	int c;

	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d %d %d", &a, &b, &c);
		a = a*a;
		b = b*b;
		c = c*c;
		if (a + b == c || b + c == a || c + a == b){
			printf("YES\n");
		}
		else printf("NO\n");
	}

		return 0;
	}

C++: #include<stdio.h>
int main(void)
{
	int n=0;
	int i=0;
	int a,b,c;
	int irekae=0;
	int irekae2=0;
	scanf("%d",&n);
	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;
			irekae2=b;
			a=c;
			b=irekae;
			c=irekae2;
		}
		if (c*c==a*a+b*b)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

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

#define REP(i, s, n) for(int i = s; i < n; ++i)
#define rep(i, n)		 REP(i, 0, n)
#define SORT(c)			 sort((c).begin(), (c).end())
#define IINF					INT_MAX
#define LLINF					LLONG_MAX
#define DEBUG					false

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

C++: #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	

	cin>>n;
	for(int i=0;i<n;i++){
		priority_queue <int > dp;
		for(int i=0;i<3;i++){
			int k;
			cin>>k;
			dp.push(k);
		}
		int a=dp.top();dp.pop();
		int b=dp.top();dp.pop();
		int c=dp.top();dp.pop();
		if(a*a==((b*b)+(c*c))){
			cout<<"YES\n";
		}else{
			cout<<"NO\n";
		}
	}
	return 0;
}

C++: #include<iostream>
int main(){
	using namespace std;
	int j,n,leng[1000];
	cin>>n;
	for(int i=0;i<n;++i){
		cin>>leng[3*i]>>leng[(3*i)+1]>>leng[(3*i)+2];
		for(int a=0;a<3;++a)
        for(int b=a+1;b<3;++b)
            if(leng[(3*i)+a]>leng[(3*i)+b])j=leng[(3*i)+a],leng[(3*i)+a]=leng[(3*i)+b],leng[(3*i)+b]=j;

	}

	for(int i=0;i<n;++i){
		if((leng[3*i]^2)+(leng[(3*i)+1]^2) == (leng[(3*i)+2]^2))cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;

#define MAX 256

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

	scanf("%d", &n);
	int ans[n];

	for (int i = 0; i < n; i++){
		scanf("%d%d%d", &a, &b, &c);
		if (a > b){
			int d = a;
			a = b;
			b = d;
		}
		if (c < a){
			int d = a;
			a = c;
			c = b;
			b = d;
		}
		else if (c > a&&c < b){
			int d = b;
			b = c;
			c = d;
		}
		if (a*a + b*b == c*c){
			ans[i] = 1;
		}
		else{
			ans[i] = 0;
		}
	}

	for (int i = 0; i < n; i++){
		if (ans[i] == 1)printf("YES\n");
		if (ans[i] == 0)printf("NO\n");
	}

	return 0;
}

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

using namespace std;

int main(void){
  int n,array[3],i,temp;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d%d",&array[0],&array[1],&array[2]);
    sort(array,array+3);
    if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2])  printf("Yes\n");
    else  printf("No\n");
  }

  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <bitset>
#include <set>
#include <queue>

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,b,n) for(int i=b;i<n;i++)

const float PI = 3.1415926;
static const int INFTY = (1<<30);

using namespace std;

typedef long long ll;
typedef long double ld;

int n, a, b, c;

int main() {
  cin >> n;
  rep(i,n){
    cin >> a >> b >> c;
    int tmp = max(max(a,b),c);
    if(a == tmp) a=c;
    if(b == tmp) b=c;
    if(a*a + b*b == tmp*tmp)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }

  return 0;
}

C++: #include <stdio.h>

void swap(int &a,int &b){
	int tmp=a ; a=b ; b = tmp; 
}
int main(){
	int array[3];
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
    for(int i=0; i<3; i++) scanf("%d",&array[i]);
    for(int i=0; i<3; i++) for(int j=0; j<2; j++) if(array[j]>array[j+1]) {
        swap(array[j],array[j+1]); 
        
    }
	if(array[0]*array[0]+array[1]*array[1]==array[2]*array[2]){
		printf("YES\n");
	}else{
		printf("NO\n");
	}
	}
    return 0;
}

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

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

C++: #include <stdio.h>
#include <math.h>
int trianglechecker(int x, int y, int z);
int main(void){
    int loop, len1, len2, len3;
    int f = 0;
    scanf("%d", &loop);
    for(int i = 0; i < loop; i++)
    {
        scanf("%d%d%d", &len1, &len2, &len3);
        f = trianglechecker(len1, len2, len3);
        if(f == 1)
        {
            printf("YES\n");
        }
        if(f == 0)
        {
            printf("NO\n");
        }
    }
    return 0;
}
int trianglechecker(int x, int y, int z)
{
    if(x * x == y * y + z * z){
        return 1;
    }
    if(y * y == x * x + z * z){
        return 1;
    }
    if(z * z == y * y + x * x){
        return 1;
    }
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main() {
	int a;
	scanf("%d", &a);
	for (int i = 0; i < a;i++) {
		int b, c, d;
		scanf("%d%d%d", &b, &c, &d);
		int max = b;
		if (b<c)max = c;
		if (max<d)max = d;
		if (max*max == b*b + c*c + d*d - max*max)printf("YES\n");
		else printf("NO\n");
	}
	return 0;
}

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;
		}
	}
	return 0;
}

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

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

    return 0;
}

C++: #include <stdio.h>

int aaa(int a, int b, int c){
	if(a*a+b*b==c*c){
		return 1;
	}
	return 0;
}

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

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