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 <iostream>

using namespace std;
int loop;
int panjang[1000][1000];
int y = 0;
int temp = 0;
int main()
{
 cin >> loop;
for(int x=0;x<loop;x++)
{
        cin >> panjang[x][y] >> panjang[x][y+1] >> panjang[x][y+2];

}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<4;looper2++)
{
    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;
            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;
    }
    }

}

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 <stdio.h> #include <algorithm> using namespace std; int main(){ int i, n,j,cnt = 0; scanf("%d",&n);int tri[3]; for (i = 0; i < n; i++){ for (j = 0; j < 3; j++){ scanf("%d",tri[i]); } sort(tri,tri+3); if (tri[0]*tri[0] + tri[1]*tri[1] = tri[2]*tri[2]) cnt++; } printf("%d\n",cnt); return 0; }

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

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

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

C++: #include <cstdio>

int main(){
	int n;
	int a[1010],b[1010],c[1010];

	scanf("%d",&n);

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

	for(int j =1;j<=n;j++){
		if((c[j]*c[j]) == ((a[j]*a[j])+(b[j]*b[j]))){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
}

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

using namespace std;

int main() {
    vector<int> side(3,0);
    int N;
    cin >> N;
    for(int i=0; i<N; ++i) {
        for(int j=0; j<3; ++j) cin >> side[j];
        sort(side.rbegin(), side.rend());
        if(side[0]*side[0]==side[1]*side[1]+side[2]*side[2]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <iostream>
using namespace std;
void isTriangle()
{
	int j;
	cin >> j;
	for (int i = 0; i < j; i++)
	{
		int a, b, c;
		cin >> a;
		cin >> b;
		cin >> c;
		bool flag = false;
		if (a * a + b*b == c * c)flag = true;
		if (b * b + c * c == a * a)flag = true;
		if (c * c + a *a == b * b)flag = true;

		if (flag)cout << "YES" << endl;
		if (!flag)cout << "NO" << endl;
	}
}

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

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 && b<a+c && c<a+b) cout<< "YES" << endl;else cout << "NO" << endl;
}
return 0;
}

C++: #include<stdio.h>

void swap(int *x,int *y)
{
	int temp = *x;
	*x=*y;
	*y=temp;
}

int main()
{
	int count;
	scanf("%d",&count);

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

}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  int c;
  cin >>c;
  while(c--){
    vector<int> edge(3);
    for(int i=0; i<3; i++) cin >>edge[i];
    for(int i=0; i<3; i++) edge[i] = edge[i]*edge[i];
    sort(edge.begin(),edge.end());
    if(edge[2] == edge[1]+edge[0]) cout <<"YES"<<endl;
    else cout <<"NO"<<endl;
  }
  return 0;
}

C++: #include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<math.h>
#include<iostream>
#include<stack>
#include<queue>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
using namespace std;

#define LL long long
 int main()
{
    LL t,a[5];
    cin>>t;
    while(t--)
    {
        for(LL i=0;i<3;i++)
        cin>>a[i];
        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 <iostream>

using namespace std;

void swap(int x, int y) {
  int temp;
  temp = x;
  x = y;
  y = temp;
}

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

  cin >> n;
  while(1) {
    cin >> a >> b >> c;

    if (a > b) {
      swap(a, b);
    }
    if (b > c) {
      swap(b, c);
    }
    if (a > c) {
      swap(a, c);
    }
    
    if (a*a + b*b == c*c) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }

  return 0;
}

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

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

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

        double a2, b2, c2;
        a2 = pow(a,2);
        b2 = pow(b,2);
        c2 = pow(c,2);

        cout << a2 << b2 << c2 << endl;

        if (a2 == b2 + c2 || b2 == a2 + c2 || c2 == a2 + b2) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }

    return 0;
}

C++: #include <iostream>

using namespace std;

void swap(int x, int y) {
  int temp;
  temp = x;
  x = y;
  y = temp;
}

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

  cin >> n;
  while(n > 0) {
    n--;
    cin >> a >> b >> c;

    if (a > b) {
      swap(a, b);
    }
    if (b > c) {
      swap(b, c);
    }
    if (a > c) {
      swap(a, c);
    }
    
    if (a*a + b*b == c*c) {
      cout << "YES" << endl;
    } else {
      cout << "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;
    vector<int> l;
    cin>>n;
    
    for (int i=0; i<n; i++) {
        l.clear();
        for (int i=0; i<3; i++) {
            int d;
            cin>>d;
            l.push_back(d);
        }
        sort(l.begin(), l.end());
        if (l[0]*l[0]+l[1]*l[1]==l[2]*l[2]) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
    return 0;
}

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

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

  cin >> n;
  while(n-- > 0) {
    cin >> a >> b >> c;

    int array[3] = { a, b, c };
    sort(array, array+3);

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

  }
  return 0;
}