Go: package main
import (
        "fmt"
)

func main() {
        var num int
        fmt.Scan(&num)

        for i := 0; i < num; i++ {
                s1 := 0
                s2 := 0
                s3 := 0
                var chk int = 0
                fmt.Scanf("%d %d %d", &s1, &s2, &s3)
                if s1 >= s2 {
                        if s1 > s3 {
                                chk = 1
                        } else {
                                chk = 3
                        }
                } else {
                        if s2 >= s3 {
                                chk = 2
                        } else {
                                chk = 3
                        }
                }

                if (chk == 1 && s1*s1 == s2*s2 + s3*s3) ||
                        (chk == 2 && s2*s2 == s3*s3 + s1*s1) ||
                        (chk == 3 && s3*s3 == s1*s1 + s2*s2) {
                        fmt.Printf("YES\n")
                } else {
                        fmt.Printf("NO\n")
                }
        }
}

C++: #include <stdio.h>

char divide(int math, int english, int japanese);
char class;

int main(void)
{
    int dataset;
    int math, english, japanese;

    while (1){
        scanf("%d", &dataset);
        if (dataset == 0){
            break;
        } else {
            while (dataset--){
                scanf("%d %d %d", &math, &english, &japanese);
                class = divide(math, english, japanese);
                printf("%c\n", class);
            }
        }
    }

    return 0;
}

char divide(int math, int english, int japanese)
{
    int sum = math + english + japanese;

    if (math == 100 || english == 100 || japanese == 100){
        class = 'A';
    } else if (math + english >= 90 * 2){
        class = 'A';
    } else if (sum >= 80 * 3){
        class = 'A';
    } else if (sum >= 70 * 3){
        class = 'B';
    } else if (sum >= 50 * 3 && (math >= 80 || english >= 80)){
        class = 'B';
    } else {
        class = 'C';
    }

    return class;
}

C++: #include <iostream>

using namespace std;
int loop;
int panjang[1000][1000];
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];
}
for(int looper= 0;looper<loop;looper++)
{
    for(int looper2 = 0;looper2<5;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;

    }

    }
}

}
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<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
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+c*c==a*a)||(c*c+a*a==b*b)){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;   
}

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

int main(){
    int a,b,c,i;
	for(int j=0;j<1000;j++){
		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 <cstdio>
#include <cmath>
using namespace std;

int main() {
    int N;
    cin >> N;
    int a, b, c;
    for (int i=0; i<N; i++) {
        cin >> a >> b >> c;
        int l=max(a,max(b,c));
        int x, y;
        if (a==l) {
            x=b;
            y=c;
        } else if (b==l) {
            x=a;
            y=c;
        } else if (c==l) {
            x=a;
            y=b;
        }
        if (l==sqrt(pow(x,2)+pow(y,2))) {
            printf("Yes\n");
        } else {
            printf("No\n");
        }
    }
    return 0;
}

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

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

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

int main()
{
	int n;
	for (cin >> n; n; n--) {
		int a, b, c;
		cin >> a >> b;
		if (a < b) {
			int tmp = b;
			b = a;
			a = tmp;
		}
		cin >> c;
		if (a < c) {
			int tmp = c;
			c = a;
			a = tmp;
		}
		cout << (pow(a, 2) == pow(b, 2) + pow(c, 2) ? "YES" : "NO") << endl;
	}
	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 + c == a | c + a == b) cout << "YES" << endl;
        else cout << "NO" << endl;
    }

    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;


#define REP(i, n) for(int i = 0; i < n; i++)
#define VSORT(v) sort(v.begin(), v.end())

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    while (n--) {
        vector<int> a(3);
        REP(i, 3)cin >> a[i];
        VSORT(a);
        if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    return 0;
}

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

int main(int argc, const char *argv[]) {
    int n;
    std::cin >> n;
    int a, b, c, a2, b2, c2;
    for (int i = 0; i < n && std::cin >> a >> b >> c; i++) {
        a2 = a * a;
        b2 = b * b;
        c2 = c * c;
        if (a2 == b2 + c2 || b2 == c2 + a2 || c2 == a2 + b2) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int n;cin>>n;
int a[3];
for(int i=0;i<n;i++)
{
for(int j=0;j<3;j++)cin>>a[j];
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;
}