Go: package main

import (
	"fmt"
)

func main() {
	lines := [3]int{}
	var round int
	fmt.Scan(&round)
	for r := 0; r < round; r++ {
		fmt.Scan(&lines[0], &lines[1], &lines[2])

		if lines[0] > lines[1] && lines[0] > lines[2] {

		} else if lines[2] > lines[1] {
			tmp := lines[0]
			lines[0] = lines[2]
			lines[2] = tmp
		} else {
			tmp := lines[0]
			lines[0] = lines[1]
			lines[1] = tmp
		}

		if lines[1]*lines[1]+lines[2]*lines[2] == lines[0]*lines[0] {
			fmt.Println("YES")
		} else {
			fmt.Println("NO")
		}
	}
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef  long long LL;
typedef  vector<int> VI;
typedef  vector<double> VD;
typedef  string STR;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
#define POW2(a) pow(a, 2.0)
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	int x;
	cin >> x;
	REP(i,x)
	{
		VD tri;
		REP(i, 3)
		{
			double temp;
			tri.push_back(temp);
		}
		SORT(tri);
		if (tri[2] == sqrt(POW2(tri[0]) + POW2(tri[1])))
		{
			COUT("YES");
		}
		else
		{
			COUT("NO");
		}
	}
	
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

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

using namespace std;

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

C++: #include <stdio.h>
//#include <iostream>
//#include <cstdlib>
//#include <cstring>

//using namespace std;

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

  scanf("%d",&n);

  for(i=0;i<n;i++) {
    scanf("%d %d %d",&a,&b,&c);

    if(a*a+b*b==c*c || b*b+c*c==a*a || c*c+a*a==b*b) printf("YES\n");
    else printf("NO\n");
  }
  
  return 0;
}

C++: #include <stdio.h>
#include <algorithm>
#include <vector>
using namespace std;
vector<int>v;
int main(void)
{
    int testCase,n;
    scanf("%d",&testCase);
    while(testCase--){
        v.clear();
        int i=3;
        while(i--){
            scanf("%d",&n);
            v.push_back(n);
        }
        sort(v.begin(),v.end());
        if((v[0]*v[0]+v[1]*v[1])==(v[2]*v[2]))printf("YES\n");
        else printf("NO\n");
    }
    return 0;
}

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

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

int main(void) {
    priority_queue<int, vector<int>, greater<int>> que;
    int num;
    cin >> num;
    for(int r = 0; r < num; r++) {
        int a, b, c;
        cin >> a >> b >> c;
        que.push(a); que.push(b); que.push(c);
        a = que.top(); que.pop(); b = que.top(); que.pop(); c = que.top(); que.pop();
        if(a * a + b * b == c * c) printf("YES\n");
        else printf("NO\n");
    }
    
    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*a+b*b==c*c||a*a+c*c==b*b||a*a==b*b+c*c){
			cout<<"Yes"<<endl;
		}else{
			cout<<"No"<<endl;
		}
	}
}

C++: #include <iostream>
using namespace std;
#define max(x, y) ((x) > (y) ? (x) : (y))
#define min(x, y) ((x) < (y) ? (x) : (y))

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; i++){
		int x, y, z;
		cin >> x >> y >> z;
		int ma = max(x, max(y, z));
		int mi = min(x, min(y, z));
		int cen = (ma != x && mi != x ? x : ma != y && mi != y ? y : z);
		if (ma * ma == mi * mi + cen * cen){
			cout << "YES" << "\n";
		}else{
			cout << "NO" << "\n";
		}
	}
	cout.flush();
}

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

int main(void){
	int N,a,b,c,d=0,tmp;
	cin>>N;
	for(int i=1;i<=N;i++){
		
		cin>>a>>b>>c;
		
		if(a>b){
			tmp=a;
			a=b;
			b=tmp;
		}
		if(b>c){
			tmp=b;
			b=c;
			c=tmp;
		}
		if(a>b){
			tmp=a;
			a=b;
			b=tmp;
		}
	
		if(a==b){
			d=d+((a*a)%1);
			d=d+((b*b)%1);
			d=d+((c*c)%2);
		}
		else{
			d=d+((a*a)%1);
			d=d+((b*b)%4);
			d=d+((c*c)%3);
		}
		
		if(d==0){
			cout<<"No"<<endl;
		}
		else{
			cout<<"Yes"<<endl;
		}
	}
		return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a[4] = { 0 }, j, b, cnt, i, n, A = 0, B = 0, c, ruio;
	scanf("%d", &n);
	for (ruio = 0; ruio < n; ruio++) {
		scanf("%d %d %d", &a[0], &a[1], &a[2]);
		for (i = 0; i < 3; i++) {
			for (j = i; j < 3; j++) {
				if (a[i] < a[j]) {
					c = a[i];
					a[i] = a[j];
					a[j] = c;
				}
			}
		}
		if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]) {
			printf("YES\n");
		}
		else {
			printf("NO\n");
		}
	}
	}

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

#define pb push_back
#define fr first
#define sc second
typedef pair<int,int> pii;
typedef vector<int> vi;
const int INF = (1<<25);
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

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

C++: #include<stdio.h>
int main(){
  int a,b,c;
  while(scanf("%d%d",&a,&b)!=EOF){
  	c = a + b;
  	if(c<10) printf("1\n");
  	else if(c<10^2) printf("2\n");
  	else if(c<10^3) printf("3\n");
  	else if(c<10^4) printf("4\n");
  	else if(c<10^5) printf("5\n");
  	else if(c<10^6) printf("6\n");
  	else if(c<10^7) printf("7\n");
  	else break;
  }
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  int n;
  cin >>n;
  while(n--){
    vector<int> edge(3);
    for(int i=0; i<3; i++) cin >>edge[i];
    sort(edge.begin(), edge.end());
    if(edge[2]*edge[2] == edge[1]*edge[1]+edge[0]*edge[0]) cout <<"YES"<<endl;
    else cout <<"NO"<<endl;
  }
  return 0;
}

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

using namespace std;

long dd(int n){
	return n*n;
}

int main(){
	int n, t[3];
	
	cin >> n;
	for(int i=0; i<n; ++i){
		for(int j=0; j<3; ++j)
		scanf(" %d", &t[j]);
	 		
		sort(t, t+3);
		if( dd(t[2]) == dd(t[0])+dd(t[1]) ) printf("YES\n");
		else printf("NO\n");
	}
	 
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include<algorithm>
#define pf printf
#define sf scanf
#define wh while
#define db double
#define LL long long
#define _USE_MATH_DEFINES
#define re(i,a,b) for(int i=a;i<b;i++)
#define rev(i,a,b) for(int i=a;i>=b;i--)

using namespace std;

int main()
{
    int t,a,b,c;
    cin>>t;
    wh(t--){
        sf("%d%d%d",&a,&b,&c);
        if((a*a==b*b+c*c)||(b*b==a*a+c*c)||(c*c==a*a+b*b))pf("YES\n");
        else pf("NO\n");
    }
    return 0;
}