Go: package main

import (
  "fmt"
)


func main() {
  var a int
  var b int
  var c int
  var n int
  fmt.Scan(&n)
  for _, err := fmt.Scan(&a, &b, &c); err == nil; _, err = fmt.Scan(&a, &b, &c) {
    if a*a == b*b+c*c {
      fmt.Println("YES")
    } else if b*b == c*c+a*a {
      fmt.Println("YES")
    } else if c*c == a*a+b*b {
      fmt.Println("YES")
    } else {
      fmt.Println("NO")
    }
  }
}

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

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

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

using namespace std;

int a, b, ans;

int main() {
    int N, x[3];
    cin >> N;

    while (N--) {
        cin >> x[0] >> x[1] >> x[2];
        sort(x, x + 3);
        cout << (x[2] * x[2] == x[0] * x[0] + x[1] * x[1] ? "YES" : "NO") << endl;
    }
}

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

void judge(int x, int y, int z, bool flag)
{    
    if (x * x + y * y == z * z){
        flag = true;
    }  
}


int main(void)
{
    int repeat, a, b, c;
    bool flag = false;
    scanf("%d", &repeat);
    for (int i = 0; i < repeat ; ++i){
        scanf("%d %d %d", &a, &b, &c); 
        judge (a, b, c); 
        judge (b, c, a);
        judge (c, a, b);
        if (flag == true){    
            printf("YES\n");
        }else{	
            printf("NO\n");
        }
    }
    return 0;        
}

C++: #include <iostream>

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

int main(int argc, char *argv[])
{
    int dataSize;
    std::cin >> dataSize;

    int side[3];

    for(int i=0; i<dataSize; i++){
        for(int a=0; a<3;a++){
            std::cin >> side[a];
        }

        for(int b = 0; b< 3; b++){
            for(int j=b+1; j<3;j++){
                if(side[b] > side[j]){
                    int tmp = side[b];
                    side[b] = side[j];
                    side[j] = tmp;
                }
            }
        }

        
        checkTringle(side[2],side[1],side[0]);
    }
}

C++: #include<stdio.h>
int main(void)
{
	int n=1;
	int i=0;
	int a,b,c;
	int irekae=0;
	while(n!=0)
	{
		scanf("%d",&n);
		if (n==0)
		{
		
		}
		else
		{
			for (i=0;i<n;i++)
			{
				scanf("%d",&a);
				scanf("%d",&b);
				if (a<b)
				{
					irekae=a;
					a=b;
					b=irekae;
				}
				scanf("%d",&c);
				if (a>c)
				{
					irekae=a;
					a=c;
					c=irekae;
				}
				if (c*c==a*a+b*b)
				{
					printf("Yes\n");
				}
				else
				{
					printf("No\n");
				}
			}
		}
	}
}

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0003
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
	cin.tie(0);ios::sync_with_stdio(false);
	int n; cin >> n;
	for (int i = 0; i < n;i++) {
		int d[3]; for (int i = 0; i < 3; i++) cin >> d[i];
		sort(d, d + 3);
		if (d[0] * d[0] + d[1] * d[1] == d[2] * d[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
}

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

int main(void) {
  int N;
  cin >> N;
  vector<int> a(N), b(N), c(N);
  int i = 0;
  for(; i < N; i++) cin >> a[i] >> b[i] >> c[i];
  for(i = 0; i < N; i++) {
    if(a[i] * a[i] == b[i] * b[i] + c[i] * c[i] || b[i] * b[i] == c[i] * c[i] + a[i] * a[i] || c[i] * c[i] == a[i] * a[i] + b[i] * b[i]) cout << "YES";
    else cout << "NO";
    cout << endl;
  }
}

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

using namespace std;

int main(){
	int n;
	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[2] * a[2]) == (a[1] * a[1] ) * (a[0] * a[0]))
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	}
	return 0;
}

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

int main(){
	int N = 0;
	int A, B, C;
	int i, j, k;
	int work;
	cin >> N;
	for(i = 0; i < N; i++){
		cin >> A >> B >> C;

		if( (A +B) > C && (B + C) >A && (C + A) > B){
				cout << "YES\n";				
		}
		
		else{
			cout << "NO\n";
		}
    }
    return 0;
}

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

C++: #include <iostream>
#include <math.h>
#include <algorithm>

using namespace std;

int main()
{
    int i,n,j,k,l;
    double a[3];
    cin >> n;
    while(n--)
    {
        for(i=0;i<3;i++)
            cin >> a[i];
        sort(a,a+3);
        if((sqrt(a[0]*a[0]+a[1]*a[1]))==(sqrt(a[2]*a[2])))
            cout << "YES" <<endl;
        else
            cout << "NO" <<endl;
    }
    return 0;



}

C++: fn main(){
    let n=readln();
    for _i in 0..n{
        let mut v:Vec<i64> = readln();
        v.sort();
        if v[0]*v[0] + v[1]*v[1]==v[2]*v[2] {
            println!("YES");
        }
        else{
            println!("NO");
        }
    }

}
    

// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
 
pub trait FromLn {
    fn fromln(s: &str) -> Self;
}
pub fn readln<T: FromLn>() -> T {
    let mut buf = String::new();
    let _ = ::std::io::stdin().read_line(&mut buf).unwrap();
    T::fromln(buf.trim())
}
pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
    let mut vs = vec![];
    for _ in 0..n {
        vs.push(readln());
    }
    vs
}
macro_rules! fromln_primitives {
    ($($t:ty),*) => { $(
        impl FromLn for $t {
            fn fromln(s: &str) -> $t {
                s.parse().unwrap()
            }
        }
    )* }
}
fromln_primitives!(
    String,
    bool,
    f32,
    f64,
    isize,
    i8,
    i16,
    i32,
    i64,
    usize,
    u8,
    u16,
    u32,
    u64
);
impl<T> FromLn for Vec<T>
where
    T: FromLn,
{
    fn fromln(s: &str) -> Vec<T> {
        s.split_whitespace().map(T::fromln).collect()
    }
}
impl FromLn for Vec<char> {
    fn fromln(s: &str) -> Vec<char> {
        s.chars().collect()
    }
}
macro_rules! fromln_tuple {
    ($($t:ident),*) => {
        impl<$($t),*> FromLn for ($($t),*) where $($t: FromLn),* {
            fn fromln(s: &str) -> ($($t),*) {
                let mut it = s.split_whitespace();
                let t = ($($t::fromln(it.next().unwrap())),*);
                assert_eq!(it.next(), None);
                t
            }
        }
    }
}
fromln_tuple!(A, B);
fromln_tuple!(A, B, C);
fromln_tuple!(A, B, C, D);
fromln_tuple!(A, B, C, D, E);
fromln_tuple!(A, B, C, D, E, F);