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>
using namespace std;
int main(void){
    // Your code here!
    int a, b; //隣り合う辺の長さ
    int c; //対角線の長さ
    int rectangular = 0, rhombus = 0; //長方形と菱形の個数
     
    while(scanf("%d,%d,%d", &a, &b, &c) != EOF){
        if(a * a + b * b == c * c) rectangular++;
        else if(a == b) rhombus++;
    }
    cout << rectangular << endl;
    cout << rhombus << endl;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int a,b,c;
  int t=0,h=0;
  while(scanf("%d,%d,%d",&a,&b,&c)+1){
    // if(a==0)break;
    if(a==b)h++;
    if(c*c==a*a+b*b)t++;
  }
  cout<<t<<endl<<h<<endl;
}

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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false

int main()
{
    int a[3] = {0};
    int b = 0, c = 0;
    while (scanf("%d,%d,%d", &a[0], &a[1], &a[2]) != EOF)
    {
        //cout<<a[0]<<endl;
        if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1])
            b++;
        else if (a[0] == a[1])
            c++;
    }
    cout << b << endl
         << c << endl;
    return 0;
}

C++: #include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    double a,b,c;
    int cou1=0,cou2=0;
    while(scanf("%lf,%lf,%lf",&a,&b,&c)!=EOF){
        if(a*a+b*b==c*c)cou1++;
        if(a==b)cou2++;
    }
    printf("%d\n%d\n",cou1,cou2);
    return 0;
}

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

#define TYO 0
#define HIS 1

int main(){
	int in1, in2, in3;
	int ans[2] = {};

	while (scanf("%d,%d,%d", &in1, &in2, &in3) != EOF){
		// 長方形check
		if (pow(in1, 2) + pow(in2, 2) == pow(in3, 2)){
			ans[TYO]++;
		}
		else if (in1 == in2){
			ans[HIS]++;
		}
	}
	for (int i = 0; i < 2; i++){
		cout << ans[i] << endl;
	}

	return 0;
}

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

using namespace std;

void Solution()
{
    int a;
    int b;
    int c;
    
    int rect = 0; //initializing
    int lozen = 0;
    
    char comma;
    
    while (cin>>a>>comma>>b>>comma>>c)
    {
        if (a * a + b * b == c * c)
        {
            rect++;
        }
        else if (a == b)
        {
            lozen++;
        }
    }
    cout<<rect<<endl;
    cout<<lozen<<endl;
}

int main()
{
    Solution();
    return 0;
}

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

int main() {
	int len1, len2, cross, ctr1 = 0, ctr2 = 0;
	char a, b;
	vector<int> LEN1, LEN2, CROSS;

	while (cin >> len1 >> a >> len2 >> b >> cross) {
		LEN1.push_back(len1);
		LEN2.push_back(len2);
		CROSS.push_back(cross);
	}
	
	for (int i = 0; i < LEN1.size(); i++) {
		if (pow(CROSS[i], 2) == pow(LEN1[i], 2) + pow(LEN2[i], 2))ctr1++;
		else if (LEN1[i]==LEN2[i])ctr2++;
	}

	cout << ctr1 << endl << ctr2 << endl;
	return 0;
}

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

using namespace std;

int main(){

	char comma;
	int l1,l2,l3;

	int rect=0;
	int rhombus=0;

	while(cin>>l1>>comma>>l2>>comma>>l3){
		if(l1==l2){
			if(l1*l1+l2*l2==l3*l3)
				rect++;
			else
				rhombus++;
		}
		else{
			if(l1*l1+l2*l2==l3*l3)
				rect++;
		}
	}
	cout<<rect<<endl;
	cout<<rhombus<<endl;

	return 0;
}

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

int main(){
    int a, b, c;
    char comma;
    int hishi, tyou;
    hishi = 0;
    tyou = 0;
    while(cin >> a >> comma >> b >> comma >> c){
        if(a == b){
            hishi++;
        }else if(a*a + b*b == c*c){
            tyou++;
        }
    }
    cout << tyou << endl;
    cout << hishi << endl;
}

C++: #include <cstdio>

int main(){
  int a,b,c,n=0,m=0;
  while(~scanf("%d,%d,%d",&a,&b,&c)){
    if(a*a+b*b==c*c) n++;
    if(a==b) m++;
  }
  printf("%d\n%d\n",n,m);
}

C++: #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 10
#define MIN -100001
#define _MAX 10
int main(void)
{
	int a, b, c, s = 0, h = 0;
	while (scanf_s("%d,%d,%d", &a, &b, &c)) {
		if (a == b) ++h;
		else if (c*c == a*a + b*b) {
			++s;
		}
	}
	printf("%d\n%d\n", s, h);
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Here your code !
    int a,b,c,i,j;
    char t;
    while(cin>>a>>t>>b>>t>>c){
        if(c*c==a*a+b*b) i++;
         else if(a==b) j++;
    }
    cout<<i<<endl<<j<<endl;
}

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

int main(){
	string line;
	int a, b, c;
	int hishi=0, tyo=0;
	while(1){
		getline( cin, line );
		if( line.length() == 0 ){
			break;
		}
		sscanf( line.c_str(), "%d,%d,%d", &a, &b, &c );
		if( a==b ){
			hishi++;
		}else if( a*a + b*b == c*c ){
			tyo++;
		}
	}
	cout << tyo << endl;
	cout << hishi << endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
	string s;
	int a[3],b=0,c=0;
	while(cin>>s){
		a[0]=s[0]-'0';
		a[1]=s[2]-'0';
		a[2]=s[4]-'0';
		if(a[0]==a[1])b++;
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])c++;
	}
	cout<<c<<endl<<b<<endl;
}

C++: #include <cstdio>

using namespace std;

int main() {
	int side[3];
	int iso=0, cho=0;
	while(scanf("%d,%d,%d",&side[0],&side[1],&side[2]) != EOF){
		if(side[0]==side[1]) iso++;
		else if( (side[0]*side[0]) + (side[1]*side[1]) == (side[2]*side[2]) ) cho++;
	}
	printf("%d\n", cho);
	printf("%d\n", iso);
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int a[3]={},tmp,cnt,ans1=0,ans2=0;
  string s;
  while(cin >> s){
    tmp=-1,cnt=0;
    for(int i=0;i<s.size();i++){
      if(s[i]==','){
        a[cnt]=atoi(s.substr(tmp+1,i-tmp-1).c_str());
        tmp=i;
        cnt++;
      }
    }
    a[cnt]=atoi(s.substr(tmp+1,s.size()-tmp-1).c_str());
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
      ans1++;
    }
    if(a[0]==a[1]){
      ans2++;
    }
  }
  cout << ans1 << endl << ans2 << endl;
  return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {

    int e[3];
    int square = 0, rhombus = 0;

    char split;

    while(cin >> e[0] >> split >> e[1] >> split >> e[2]) {

        if(e[0] * e[0] + e[1] * e[1] == e[2] * e[2]) {
            ++square;
        } else if(e[0] == e[1]) {
            ++rhombus;
        }

    }

    cout << square << endl << rhombus << endl;

}

C++: #include <iostream>
using namespace std;
 
int main()
{
    int a = 0, b = 0;
    int x,y,z;
    char a, b;
    while(cin >> x >> a >> y >> b >> t)
   {
        if(((x * x) + (y * y)) == z* z) a++;
        if(x == y) h++;
    }j
    cout << a << endl;
    cout << b << endl;
    return 0;
}

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

int main()
{
	int a, b, c;
	char d;
	int t=0, h=0;
	while (cin >> a >> d >> b >> d >> c){
		if (c*c == (a*a + b*b))
			t++;
		if ((a == b) || (b == c) || (a == c))
			h++;
	}

	cout << t << endl << h << endl;
	return 0;
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

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