Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	d := 0
	e := 0
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		a, _ := strconv.Atoi(info[0])
		b, _ := strconv.Atoi(info[1])
		c, _ := strconv.Atoi(info[2])
		if a*a + b*b == c*c {
			d++
		}
		if a == b {
			e++
		}
	}
	fmt.Println(d)
	fmt.Println(e)
}

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

int main()
{
	int a, b, c = 0;
	int rect_num = 0;
	int diamond_num = 0;
	while (std::cin >> a >> b >> c)
	{
		int a2 = std::pow(a, 2);
		int b2 = std::pow(b, 2);
		int c2 = std::pow(c, 2);
		if ((a2 + b2) == c2)
		{
			rect_num++;
		}
		else
		{
			if ((a + b <= c) && (a == b))
			{
				diamond_num++;
			}
		}
	}
	std::cout << rect_num << std::endl;
	std::cout << diamond_num << std::endl;

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <cstdio>
#include <cmath>
#include <istream>
#include <sstream>
#include <iterator>

using namespace std;

typedef ostringstream OSS;
typedef istringstream ISS;

typedef pair<int,int> P_II;

#define REP(i,a,n) for(int i=a;i<n;i++)
#define rep(i,n) REP(i,0,n)

int main() {
  int a[10000][3];
  int rect = 0, lozen = 0;
  map<string,bool> mp;
  OSS oss;
  
  for(int i = 0; scanf("%d,%d,%d", &a[i][0], &a[i][1], &a[i][2])!=EOF; i++) {
    sort(a[i], a[i]+3);
    oss << a[i][0] << "," << a[i][1] << "," << a[i][2];
    if(!mp[oss.str()]) {
      mp[oss.str()] = true;
      if(a[i][0]*a[i][0] + a[i][1]*a[i][1] == a[i][2]*a[i][2]) rect++;
      else lozen++;
    }
    oss.str("");
  }
  cout << rect << endl << lozen << endl;
  
  return 0;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

#define pb         push_back
#define mp         make_pair
#define ll         long long
#define PI         acos(-1.0)
#define ALL(A)     ((A).begin(), (A).end())
#define vsort(v)   sort(v.begin(),v.end())
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)

int main(){
    int a,b,c;
    int sq=0,hishi=0;
    while(scanf("%d,%d,%d",&a,&b,&c)==3){
        if(a*a+b*b==c*c) sq++;
        if(a==b) hishi++;
    }
    cout << sq << endl;
    cout << hishi << endl;
}

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

using namespace std;

int main() {
  int s1, s2, d;
  int rec_num = 0;
  int loz_num = 0;
  while (scanf("%d,%d,%d\n", &s1, &s2, &d) != EOF) {
    if (s1*s1+s2*s2==d*d) {
      rec_num++;
      continue;
    } else if (s1==s2) {
      loz_num++;
    }
  }
  cout << rec_num << endl;
  cout << loz_num << endl;
      
  return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
	int side[3];
	int iso=0, cho=0;
	while(cin>>side[0]>>side[1]>>side[2]){
		if(side[0]==side[1]) iso++;
		else if( (side[0]*side[0]) + (side[1]*side[1]) == (side[2]*side[2]) ) cho++;
	}
	cout<<iso<<endl;
	cout<<cho<<endl;
	return 0;
}

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

int main() {
	int sides[3]; int square = 0, para = 0;
	while (scanf("%d,%d,%d", &sides[0], &sides[1], &sides[2]) != EOF) {
		//??£?????¢???check
		if (sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2]) {
			square++;
		}
		//??????????????¢???check
		else if (sides[0] == sides[1]) {
			para++;
		}
		cout << square << endl << para << endl;
	}
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
//	cut here before submit 
//	freopen ("testcase.PB", "r", stdin );
	string str = "";
	int rectangle = 0, lozenge = 0;
	while (getline (cin, str ) ){
		int n = str.length();
		rep (i, n ){
			if (str[i] == ',' ) str[i] = ' ';
		} // end rep
		stringstream ss (str );
		int side1, side2, diagonal;
		ss >> side1 >> side2 >> diagonal;
		if (side1 == side2 || side1*side1 + side2*side2 == diagonal*diagonal ){
			if (side1 == side2 && side1*side1 + side2*side2 == diagonal*diagonal ){
				++rectangle; ++lozenge;
			}else
			if (side1 != side2 && side1*side1 + side2*side2 == diagonal*diagonal ){
				++rectangle;
			}else
			if (side1 == side2 && side1*side1 + side2*side2 != diagonal*diagonal ){
				++lozenge;
			} // end if
		} // end if
	} // end loop
	cout << rectangle << endl;
	cout << lozenge << endl;

//	printf ("%d\n", res );
		
	return 0;
}

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

int main(){
    int a, b, c, rect=0, loz=0;
    
    while(scanf("%d,%d,%d", &a, &b, &c)!=EOF){
        if(a+b>c){
            if(a*a+b*b==c*c){
                rect++;
            }
            if(a==b){
                loz++;
            }
        }
    }
    
    cout<< rect<< endl;
    cout<< loz<< endl;
    
    return 0;
}

C++: #include<cstdio>

using namespace std;

int main(void){
	int h1,h2,tai;
	int data,tyou=0,hisi=0;

	while((scanf("%d,%d,%d",&h1,&h2,&tai))!=EOF){
		if(h1==h2)	hisi++;
		data=h1*h1+h2*h2;
		if(data==tai*tai)	tyou++;
	}
	printf("%d\n%d\n",tyou,hisi);

	return 0;
}

C++: #include<stdio.h>

int main(){

int x,y,z;
int N=0,W=0;
while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
if(x==y)N++;
else if(x!=y)W++;
}
printf("%d\n",N);printf("%d\n",W);

return 0;
}

C++: #include <cstdio>

using namespace std;

int main()
{
  int x, y, r, hisi = 0, tyou = 0;
  while (scanf("%d %d %d ", &x, &y, &r) == 3) {
    if (x == y) {hisi++;}
    if (x * x + y * y == r * r) {tyou++;}
  }
  
  printf("%d\n%d\n", hisi, tyou);
}

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

using namespace std;

int main() {
    int a, b, c, rect = 0, rhom = 0;
    while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
        if (a == b) {
            rhom++;
        }
        else if (a*a + b*b == c*c) {
            rect++;
        }
    }
    cout << rect << endl << rhom << endl;

    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int a,b,c;
  int cnta=0,cntb=0;
  while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
    if(a*a+b*b==c*c)cnta++;
    else if(a==b)cntb++;
  }
  cout<<cnta<<endl<<cntb<<endl;
}

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

using namespace std;

int main(){
  int a[3];
  int rec=0,dia=0;
  while(scanf("%d,%d,%d",&a[0],&a[1],&a[2])!=EOF){
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
      rec++;
    }
    if(a[0]==a[1]){
      dia++;
    }
  }
  cout<<rec<<"\n"<<dia<<"\n";
  return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
typedef long long lli;
 
int main() {
  lli a, b, c;
  int re, hi;
  re = hi = 0;
  while(scanf("%lld,%lld,%lld", &a, &b, &c) != EOF) {
    if(a*a+b*b == c*c) ++re;
    if(a == b) ++hi;
  }
  cout << re << endl;
  cout << hi << endl;
  return 0;
}

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

int main()
{
	int a,b,c;
	int l=0,h=0;

	while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
		if(a*a + b*b == c*c){
			if(a == b)
				++h;
			else
				++l;
		}
	}
	
	cout << l << endl << h << endl;
	
	return 0;
}