Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	n, _ := strconv.Atoi(strScan())
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < n; i++ {
		scanner.Scan()
		strArr := strings.Fields(scanner.Text())
		castNumArr := StringToInt(strArr)
		fmt.Println(checkTriangle(castNumArr))
	}
}

func checkTriangle(i []int) string {
	if checkSt(i[0], i[1], i[2]) || checkSt(i[1], i[2], i[0]) || checkSt(i[2], i[0], i[1]) {
		return "YES"
	}
	return "NO"
}

func Sq(x int) int {
	return x * x
}

func checkSt(a, b, c int) bool {
	return (Sq(a) + Sq(b)) == Sq(c)
}

func StringToInt(s []string) []int {
	var i []int
	for _, v := range s {
		castNum, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		i = append(i, castNum)
	}
	return i
}

func strScan() (stringInput string) {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	stringInput = scanner.Text()
	return
}

C++: #include <iostream>

inline bool is_right_triangle(const u_int a, const u_int b, const u_int c) {
    return (a*a == b*b + c*c || b*b == c*c + a*a || c*c == a*a + b*b);
}

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

    std::cin >> n;
    for (u_int i = 0; i < n; ++i) {
        std::cin >> a >> b >> c;
        std::cout << (is_right_triangle(a, b, c) ? "YES\n" : "NO\n");
    }

    return 0;
}

C++: #include <stdio.h>

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

int main(void)
{
    int number;
    scanf("%d", &number);
    triangle(number);
    return 0;
}

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

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

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

using namespace std;

void sort(int* arr);

int main()
{
    int num, h, l, r;
    int line[3];

    cin >> num;

    for (int n = 0; n < num; n++)
    {
        cin >> line[0] >> line[1] >> line[2];

//        cout << "input:" << line[0] << " " << line[1] << " " << line[2] << endl;

        h = 0;
        l = 0;
        r = 0;

        sort(line);
        h = line[0];
//        h = *max_element(line, line + num);
//        cout << "max:" << h << endl;

        for (int i = 0; i < 3; i++)
        {
            if (line[i] == h && l == 0)
            {
                l = line[i] * line[i];
            }
            else
            {
                r += line[i] * line[i];
            }
        }

//        cout << "left:" << l << endl;
//        cout << "right:" << r << endl;

        if (l == r)
        {
            cout << "YES" << endl;
        }
        else
        {
            cout << "NO" << endl;
        }
    }

    return 0;
}

void sort(int* arr)
{
    for (int i = 0; i < 2; i++)
    {
        for (int n = 0; n < 2 - i; n++)
        {
            if (arr[n] < arr[n+1])
            {
                swap(arr[n], arr[n+1]);
            }
        }
    }
}

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

bool isRightTriangle(int a, int b, int c) {
    int newc = sqrt(a*a + b*b);
    int newb = sqrt(c*c - a*a);
    int newa = sqrt(c*c - b*b);
    return(a == newa && b == newb && c == newc);
}

int main(void) {
    int num; cin >> num;
    for(int r = 0; r < num; r++) {
        int a, b, c; cin >> a >> b >> c;
        cout << (isRightTriangle(a, b, c) ? "YES" : "NO") << endl;
    }
    return(0);
}

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

int main() {
	int a;
	scanf("%d", &a);
	vector<int>b(3);
	for (int c = 0; c < a; c++) {
		scanf("%d%d%d", &b[0], &b[1], &b[2]);
		sort(b.begin(), b.end());
		if (b[0] * b[0] + b[1] * b[1] == b[2] * b[2])printf("YES\n");
		else printf("NO\n");
	}
}

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

inline bool isTriangle(int edge[]){
    return edge[2]<edge[0]+edge[1]?true:false;
}

int main(void){
    int edge[3];
    int n;
    std::cin>>n;
    for(int i=0;i<n;i++){
        std::cin>>edge[0]>>edge[1]>>edge[2];
        std::sort(edge,edge+3);
        std::cout<<(isTriangle(edge)?"YES":"NO")<<std::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;
        if(a*a==b*b+c*c){
            cout << "Yes" << endl;
        }
        else if(b*b==c*c+a*a){
            cout << "Yes" << endl;
        }
        else if(c*c==a*a+b*b){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
    return 0;
}

C++: #include <stdio.h>

#define MAX 1000000

int isPrime[MAX];

int main(){
    int num;
    int i, j;
    int count;
    
    // ??????????????????
    isPrime[0] = isPrime[1] = 0;
    for(i = 2; i < MAX; i++){
        isPrime[i] = 1;
    }
    
    // ??¨??????????????????????????????
    for(i = 2; i * i < MAX; i++){
        if(isPrime[i]){
            // i????????°????´???°?????????????????§????????°?????´
            for(j = 2 * i; j < MAX; j+=i){
                isPrime[j] = 0;
            }
        }
    }

    while(scanf("%d", &num) != EOF){
        count = 0;
        while(num){
            count += isPrime[num--];
        }
        printf("%d\n", count);
    }

    return 0;
}

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

bool isTriangle(int a, int b, int c);

int main(){
	int a, b, c, count;
	bool check;
	
	std::cin >> count;
	
	for(int i = 0; i < count; ++i){
		std::cin >> a >> b >> c;
		
		int max_num = std::max({a, b, c});
		if(max_num == a) check = isTriangle(b, c, a);
		else if(max_num == b) check = isTriangle(a, c, b);
		else if(max_num == c) check = isTriangle(a, b, c);
		
		if(check) std::cout << "YES" << std::endl;
		else std::cout << "NO" << std::endl;
	}
	
	return 0;
}

bool isTriangle(int a, int b, int c){
	if(std::pow(a, 2) + std::pow(b, 2) == std::pow(c, 2)) return true;
	else return false;
}

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

int main(){
    int total_num;
    cin >> total_num;
    int a,b,c;
    for (int i = 0; i< total_num;i++){
        cin >> a >> b >> c;
        int array[3] = {a,b,c};
        std::sort(array, array+3);
        if (pow(array[2], 2) == pow(array[0],2) + pow(array[1],2))
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }

}

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){
			cout<<"YES"<<endl;
		}else{
			cout<<"NO"<<endl;
		}
	}	
}