Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	num := int(n)
	var strs []string
	var a, b, c int
	var res string
	var YES string = "YES"
	var NO string = "NO"
	for i := 0; i < num; i++ {
		scanner.Scan()
		strs = strings.Split(scanner.Text(), " ")
		a, _ = strconv.Atoi(strs[0])
		b, _ = strconv.Atoi(strs[1])
		c, _ = strconv.Atoi(strs[2])

		res = NO
		if c*c == (a*a+b*b) || b*b == (a*a+c*c) || a*a == (b*b+c*c) {
			res = YES
		}
		fmt.Printf("%s\n", res)
	}
}

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

int main()
{
  int n;
  cin >> n;
  for(int i=0; i<n; i++){
    int a,b,c;
    int temp;
    cin >> a >> b >> c;
    if(a<b){
      temp = a;
      a = b;
      b = temp;
    }
    if(a<c){
      temp = a;
      a = c;
      c = temp;
    }

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

  return 0;
}

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

int main(int argc, char *argv[]) {
  int n;
  string yes = "YES";
  string no = "NO";

  cin >> n;
  vector<string> result;
  int tri[3];
  for (int i = 0; i < n; i++) {
    cin >> tri[0] >> tri[1] >> tri[2];
    sort(tri, tri+3);
    int hoge = pow(tri[0], 2) + pow(tri[1], 2);
    result.push_back(pow(tri[2], 2) == hoge ? yes : no);
  }
  for (int i = 0; i < n; i++)
    cout << result[i] << endl;
  return 0;
}

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

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

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

int main() {
	// your code goes here
	int n;
	cin >> n;
	for (int i=0;i<n;i++) {
		int a,b,c;
		cin >> a >> b >>c;
		int aa = a*a;
		int bb = b*b;
		int cc = c*c;
		if (aa==bb+cc||bb==aa+cc||cc==aa+bb) {
			cout <<"YES"<<endl;
		}
		else {
			cout <<"NO"<<endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int N;
	cin>>N;
	for (int i = 0; i < N; i++) {
		int len[3];
		for (int j = 0; j < 3; j++) {
			cin>>len[j];
		}
		sort(len,len+3);
		if(pow(len[2],2)==pow(len[1],2)+pow(len[0],2)){
			puts("YES");
		}else{
			puts("NO");
		}
	}
	return 0;
}

C++: #include <cstdio>

int i,a,b,c;
int main()
{
	scanf("%d",&i);
		while(i!=0)
		{
			scanf("%d %d %d",&a,&b,&c);
			
			if(a+b>c&&b+c>a&&c+a>b)
			{
				printf("YES\n");
			}
			else if(c>=a+b||b+c>=a||c+a>=b)	
			{
				printf("NO\n");
			}
			i--;
		}

	return 0;
}

C++: #include <iostream>
#include <math.h>
#include <algorithm>
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 tmp;
        if(b>=a && b>=c){
            tmp = b;
            b = a;
            a = tmp;
        }else if(c>=a && c>=b){
            tmp = c;
            c = a;
            a = tmp;
        }
        if(a*a == b*b + c*c){
            cout <<"YES" <<endl;
        }else{
            cout <<"NO" <<endl;
        } 
        
    }
        
        return 0;
    }

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

int main() {
	int n, a, b, c;
	cin >> n;
	while (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 M;
    int a,b,c;
    
    cin >> M;
    
    while(cin >> a >> b >> c){
        if(a*a == b*b + c*c)
            cout << "YES" <<endl;
        else if(a*a + b*b == c*c)
            cout << "YES" <<endl;
        else if(a*a + c*c ==b*b)
            cout << "YES" <<endl;
        else
            cout << "NO" << endl;
    }
    
    
    return 0;
}

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

int main() {
    int N, a, b;
    cin >> N;
    vector<int>triangle(3);
    for(int i = 0; i < N; i++){
      for(int j = 0; j < 3; j++){
        cin >> triangle.at(j);
      }
      sort(triangle.begin(), triangle.end());

      int A, B, C;

      A = triangle.at(0);
      B = triangle.at(1);
      C = triangle.at(2);

      if(A * A + B * B == C * C){
        cout << "YES" << endl;
      }
      else{
        cout << "NO" << endl;
      }
    }
}

C++: #include<iostream>
using namespace std;
int main() {
	int data_lim;
	cin >> data_lim;
	for(int cnt=0;cnt<data_lim;cnt++) {
		int a,b,c;
		cin >> a >> b >> c;
		
		bool flg = false;
		// ピタゴラスの定理を適用
		if(a*a == b*b+c*c)
			flg = true;
		else if(b*b == a*a+c*c)
			flg = true;
		else if(c*c == a*a+b*b)
			flg = true;
		
		if(flg == true)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
		
	}
	
	return 0;
}

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

int main(){
  int a, b, c, n;
  cin >> n;
  while((n--) && (cin >> a)){
    cin >> b;
    cin >> c;
    a = a * a;
    b = b * b;
    c = c * c;
    if((a + b == c) || (a + c == b) || (b + c == a)) cout << "YES\n";
    else cout << "NO\n";
  }

  return 0;
}

C++: #include <stdio.h>
#include <math.h>

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

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

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

scanf(" %d",&n);

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

return 0;
}