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>
#include <algorithm>

using namespace std;

int main()
{
    int N, a[4];
    cin >> N;
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < 3; j++) {
            cin >> a[j];
        }
        sort(a, a + 3);
        cout << (a[0]*a[0] + a[1]*a[1] == a[2]*a[2] ? "YES" : "NO") << endl;
    }
    return 0;
}

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

using namespace std;

int main()
{
    int n;
    cin>>n;
    while(n--)
    {
        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\n";
        else
            cout<<"NO\n";
    }
    return 0;
}

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

int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

  int i, n, a, b, c;
  vector<int> triangle;
  cin >> n;

  for (i = 0; i < n; i++) {
    cin >> a;
    cin >> b;
    cin >> c;
    triangle.push_back(a);
    triangle.push_back(b);
    triangle.push_back(c);

    sort(triangle.begin(), triangle.end());
    if (triangle.at(0) * triangle.at(0) + triangle.at(1) * triangle.at(1) == triangle.at(2) * triangle.at(2)) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }

    triangle.clear();
  }

  return 0;
}

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

int main()
{
    vector<int> a(3);
    cin >> a[0];
    while (cin >> a[0] >> a[1] >> a[2])
    {
        sort(a.begin(), a.end());
        if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
        {
            printf("YES\n");
        }
        else
        {
            printf("NO\n");
        }
    }
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <sstream>
using namespace std;
void swap(int idx1, int idx2, int *node)
{
	int f = node[idx1];
	node[idx1] = node[idx2];
	node[idx2] = f;
}
//nlogn
void quickSort(int left, int right, int *node)
{
	int pl = left;
	int pr = right;
	int pivot_f = node[(pl + pr) / 2];
	do
	{
		while (node[pl] < pivot_f)
		{
			pl++;
		}
		while (node[pr]> pivot_f)
		{
			pr--;
		}
		if (pl <= pr)
		{
			swap(pl++, pr--, node);
		}
	} while (pl <= pr);
	if (left < pr) quickSort(left, pr, node);
	if (pl <= right) quickSort(pl, right, node);
}

bool compare(int a, int b)
{
	if (a == b)
	{
		return true;
	}
	else {
		return false;
	}
}
int main()
{
	int max = 0;
	cin >> max;
	for (int num = 0; num <= max; num++)
	{
		string str;
		string item;
		vector<string> list;
		getline(cin, str);
		int edge[3];
		stringstream ss(str);
		while (getline(ss, item, ' ') && !item.empty()) {
			list.push_back(item);
		}
		
		edge[0] = stoi(list[0].c_str());
		edge[1] = stoi(list[1].c_str());
		edge[2] = stoi(list[2].c_str());
		quickSort(0, 2, edge);

		int edge1 = edge[2] * edge[2];
		int edge2 = edge[0] * edge[0] + edge[1] * edge[1];
		if (compare(edge1, edge2))
		{
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main(){
	int num;
	cin >> num;
	int count;
	for(count=0; count<num; count++){
	    int a,b,c;
	    cin >> a >> b >> c;
	    //using Pythagorean theorem
	    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>
#include<vector>
#include<math.h>
using namespace std;

int main(){
	double sd[3];
	int N;
	cin>>N;
	while(N>0){
		cin>>sd[0]>>sd[1]>>sd[2];
		sort(sd,sd+3);
		if(sd[2] == sqrt(pow(sd[1],2.0)+pow(sd[0],2.0))){
			cout<<"YES"<<endl;
		}
		else{
			cout<<"NO"<<endl;
		}
		N--;
	}
	
	
	return 0;
}

C++: // 0003.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#include<stdio.h>
#include "stdafx.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

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

}

C++: #include<iostream>

int main(){
	int a,b,c;
	
	std::cin>>a>>b>>c;
	if(a*a==b*b+c*c){
		std::cout<<"YES"<<std::endl;
		}if(b*b==a*a+c*c){
		std::cout<<"YES"<<std::endl;
		}if(c*c==b*b+a*a){
		std::cout<<"YES"<<std::endl;
			}else{
			std::cout<<"NO"<<std::endl;
			}

	

    return 0;
}

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

int main(){
    int n;
    scanf("%d", &n);
    int sides[3];
    for (int i = 0; i < n; i++){
	cin >> sides[0] >> sides[1] >> sides[2];
	sort(sides, sides+3);
	printf("%s\n", (sides[0]^2 + sides[1]^2 == sides[2]^2)? "YES" : "NO");
    }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a[3];
  int judge[1001];
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>a[0];
    cin>>a[1];
    cin>>a[2];
    for(int j=0;j<2;j++){
      for(int k=0;k<1;k++){
	if(a[k]<a[k+1]){
	  int temp=a[k];
	  a[k]=a[k+1];
	  a[k+1]=temp;
	}
      }
    }
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
      judge[i]=1;
    }else{
      judge[i]=0;
    }
  }
  for(int i=0;i<n;i++){
    if(judge[i]==1){
      cout<<"YES"<<endl;
    }else{
      cout<<"NO"<<endl;
    }
  }
  return 0;
}

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

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

class Triangle{
private:
	int a, b, c;
public:
	void Set();
	bool Jugde();
};

void Triangle::Set(){
	cin >> a >> b >> c;
}

bool Triangle::Jugde(){
	int buf;
	if(a < b){
		buf = a;
		a = b;
		b = buf;
	}
	if(a < c){
		buf = a;
		a = c;
		c = buf;
	}
	if(a*a == b*b + c*c) return true;
	else return false;
}

int main(){

	int n;
	bool jugde;
	Triangle* dataset;

	cin >> n;

	dataset = new Triangle[n];

	for(int i = 0; i < n; i++)
		dataset[i].Set();

	for(int i = 0; i < n; i++){
		jugde = dataset[i].Jugde();
		if(jugde == true)
			cout << "YES" << "\n";
		else
			cout << "NO" << "\n";
	}

	return 0;
}