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 <stdio.h>
#include <math.h>

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	long int rec,i,j,t;
	int count=0;
	long int n[3]={0,0,0};
	
	scanf("%ld",&t);
	
	for(i=0;i<t;i++){
		for(j=0;j<3;j++){
			scanf("%ld",&rec);
			if(rec==0){
				count=1;
			}
			if(rec>n[0]){
				n[2]=n[1];
				n[1]=n[0];	
				n[0]=rec;
			}else if(rec>n[1]){
				n[2]=n[1];
				n[1]=rec;
			}else if(rec>n[2]){
				n[2]=rec;
			}
		}
		if(count=1){
			printf("NO\n");
		}else if(n[0]*n[0]==n[1]*n[1]+n[2]*n[2]){
			printf("YES\n");
		}else{
			printf("NO\n");
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <ctime>
#include <iterator>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;


int main()
{
    int nb_cas;
    cin>>nb_cas;
    while(nb_cas--)
    {
        vector<int> v(3);
        cin>>v[0]>>v[1]>>v[2];
        sort(v.begin(),v.end());
        if(v[0]*v[0]+v[1]*v[1] == v[2]*v[2]) cout<<"YES"<<endl;
        else cout<<"NO"<<endl;
    }
}

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

using namespace std;



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

	cin >> num;

	//cin >> a >> b >> c;

	while (cin >> a >> b >> c) {
		if (a * a + b * b == c * c || a * a + c * c == b * b || b * b + c * c == a * a)
			printf("YES\n");
		else
			printf("NO\n");
	}

		return (0);
	
}

C++: #include<iostream>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<string>
#include<queue>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<fstream>
#include<sstream>
using namespace std;
vector<long>trn;
int main()
{
    long test,i,a,b,c;

      cin>>test;
     for(i=0;i<test;i++)
     {
         cin>>a>>b>>c;
         trn.push_back(a);
         trn.push_back(b);
         trn.push_back(c);
         sort(trn.begin(),trn.end());

          if(trn[0]*trn[0]+trn[1]*trn[1]==trn[2]*trn[2])
            cout<<"YES"<<endl;
          else
            cout<<"NO"<<endl;

          trn.clear();
     }



    return 0;
}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
//#include <cstdio>
//#include <cstdlib>
//#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

	int N;
	
	cin >> N;
	
	for(int i = 0; i<3;i++){
		int a, b, c;
		cin >> a >> b >> c;
		if(a > b) swap(a, b);
		if(a > c) swap(a, c);
		if(b > c) swap(b, c);
		
		if(a * a + b * b == c * c) cout << "Yes" <<endl;
		else cout << "No" << endl;
		
	}

	return 0;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

C++: #include <iostream>
using namespace std;
int main()
{
	
    int a[100],b[100], c[100];	
	int x=0;
	int n;

	while(true){
		cin >> n;

		if(n==0)
			break;
		for(int i=0 ;i<n ;i++){
            
     		cin >> a[i] >> b[i] >> c[i];

	    	if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
		    	b[i]=x;
		    }
		    if(b[i]<c[i]){
		    	x=b[i];
	     		b[i]=c[i];
		    	c[i]=x;
		    }
		    if(a[i]<b[i]){
		    	x=a[i];
			    a[i]=b[i];
			    b[i]=x;
	    	}
            a[i] = a[i]*a[i];
		    b[i] = b[i]*b[i];
		    c[i] = c[i]*c[i];
		}
		for(int i=0 ;i<n ;i++){
		    

     		if(a[i]==b[i]+c[i])
	    		cout << "YES" << endl;
		    else
			    cout << "NO" << endl;
		}  
	        
	}
 return 0;
}

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

void ans(int *a) 
{
	if (*a == 1) {
		printf("YES\n");
	}
	else if (*a == 0) {
		printf("NO\n");
	}
}

int main(void)
{
	int n;
	int i;
	int a, b, c, x;
	int result[1000];
	
	for (i = 0; i < 1000; i++) {
		result[i] = 0;
	}
	
	scanf("%d", &n);
	
	for (i = 0; i < n; i++) {
		scanf("%d %d %d", &a, &b, &c);
		
		if (a < b) {
			x = a;
			a = b;
			b = x;
		}
		
		if (b < c) {
			x = b;
			b = c;
			c = x;
		}
		
		if (a < b) {
			x = a;
			a = b;
			b = x;
		}
		
		if (a * a == b * b + c * c) {
			result[i]++;
		}
		
	}
	
	for (i = 0; i < n; i++) {
		ans(&result[i]);
	}
	
	return (0);
}

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

int main(){
    
    int num,a,b,c;
    cin >> num;
    
    for(int ii=0;ii<num;ii++){
        cin >> a >> b >> c;
        
        if(a * a + b * b == c * c){
            cout << "YES" << endl;
        }
        else if(a * a + c * c == b * b){
            cout << "YES" << endl;
        }
        else if(b * b + c * c == a * a){
            cout << "YES" << endl;
        }
        else{
            cout << "NO" << 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 <iostream>
#include <string>
#include <cmath>
using namespace std;

string Judge_triangle(int a,int b,int c){
    if(a+b>c && b+c>a && c+a>b){
        return "YES";
    }
    else{
        return "NO";
    }
}

bool Judge_line(int x){
    if(x<1 || x>1000 || ceil(x) != floor(x))
        return true;
    else
        return false;
}

int main(){
  int N;
  int a,b,c;
  int n=0;
    
    while(1){

  cin >> N;
    
        if(N <= 0 || N > 1000 || ceil(N) != floor(N)){
            
        }
    else
        break;
    }
    
    string x[N];

while(N > 0 && cin >> a >> b >> c){
    
    
    while(1){
        if(Judge_line(a) && Judge_line(b) && Judge_line(c)){
            
            break;
        }
        
        else{
            x[N-1] = Judge_triangle(a,b,c);
            N--;
            n++;
            break;
        }
  }
}
    for(int i = 0;i < n;i++)
        cout << x[i] << endl;
    
  return 0;
}

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

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>

using namespace std;

int main()
{
	int n,x;
	vector<int> len;

	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x;
		len.push_back(x);
		cin>>x;
		len.push_back(x);
		cin>>x;
		len.push_back(x);

		sort(len.begin(),len.end());
		if(len[0]*len[0]+len[1]*len[1]==len[2]*len[2]) cout<<"YES"<<endl;
		else cout<<"NO"<<endl;

		len.clear();
	}

}