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 <cstdio>
using namespace std;

int main(void)
{
	int a,b;
	int t;

	int countt=0;
	int counth=0;

	char input[100];

	while(!cin.eof())
	{
		cin >> input;
		a = input[0] - '0';
		b = input[2] - '0';
		t = input[4] - '0';
		if(a*a+b*b == t*t)//直角を持つ
		{
			if(a == b)
				++countt;
			else
				++counth;
		}
		else
			if(a == b)
				++counth;
		if(input[5] == EOF)
			break;
	}
	cout << countt << endl;
	cout << counth << endl;
	return 0;
}

C++: p (r=$<.map{|l|a,b,c=l.split/,/.map{|i|i.to_i**2};a+b!=c&&a-b}).count(!0),r.count(0)

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
#include <bitset>
using namespace std;
#define FOR(I,F,N) for(int I = F; I < (int)(N); I++)
#define rep(i, n) FOR(i, 0, n)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};

int main(void){
	char cc;
	int a,b,c;
	int hisi = 0;
	int cho = 0;
	while(cin >> a >> cc >> b >> cc >> c){
		if(a != b && b != c && a != c){cho++;
		}else if(a == b && b == c){
		}else{ hisi++;};
	}
	FIN(hisi);
	FIN(cho);

	return 0;
}

C++: #include <iostream>

using namespace std;

int main () {
  int a, b, c;
  int hishi = 0, rect = 0;
  
  while(cin >> a){
    cin.ignore();
    cin >> b;
    cin.ignore();
    cin >> c;

    if(a == b)
      hishi++;
    if(a * a + b * b == c * c)
      rect++;
  }

  cout << rect << endl << hishi << endl;

}

C++: #include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
    int a,b,c,g,m,x=0,y=0;
    while(cin>>a>>g>>b>>m>>c){
        if(c==a*a+b*b){
            x++;
        }else if(a==b){
            y++;
        }
    }
    cout<<x<<endl<<y<<endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int a, b, c;
	int cho=0;
	int hi=0;

	while(cin >> a >> b >> c){


		if(a*a + b*b = c*c){
			cho = cho + 1;
		}
		if(a==b){
			hi = hi + 1;
		}
	}
	cout << cho << endl;
	cout << hi << endl;
}

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

int a,b,c,tyo,hi;

int main(){
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		if(c*c==a*a+b*b) tyo++;
		if(a==b) hi++;
	}
	printf("%d %d",tyo,hi);

	return 0;
}

C++: #include<iostream>

int main(){
	int a,b,c;
	char dummy;
	int t=0, h=0;
	while(std::cin>>a>>dummy>>b>>dummy>>c){
		if(a == b)h++;
		if((a*a+b*b)==c*c)t++;
	}
	std::cout<<t<<std::endl;
	std::cout<<h<<std::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++; para++;
		}
		//??????????????¢???check
		else if (sides[0] == sides[1]) {
			para++;
		}
		cout << square << endl << para << endl;
	}

C++: #include <iostream>

#include <sstream>

using namespace std;

int main(){
  int x,y,z;
  string tmp;
  int rec=0;
  int loz=0;

  //zñÌú»

  while(cin >> tmp){ //J}æØèðooÉ
    tmp.replace(tmp.find(","),1," ");
    tmp.replace(tmp.find(","),1," ");
    istringstream ss(tmp);
    ss >> x >> y >> z;
    if(x*x+y*y == z*z){
      rec++;
    }
    else if(x==y){
      loz++;
    }
  }
  cout << rec << endl << loz << endl;
}

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

int main(){
	int a,b,c;
	int rec=0,dia=0;
	
	while(scanf("%d,%d,%d",&a,&b,&c)){
		if(a*a+b*b==c*c)rec++;
		else if(a*a+b*b>c*c)dia++;
	}

	std::cout<<rec<<std::endl<<dia<<std::endl;
	
	return 0;
}

C++: #include <iostream>
#include <limits>
#include <cmath>
#include <sstream>

using namespace std;

int main() {

	int a,b,c,p = 0,l = 0;
	while (scanf("%d,%d,%d",&a,&b,&c) != EOF) {
		if (a*a + b*b == c*c) p++;
		if (a == b) l++;
	}

	cout << p << endl << l << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
 
using namespace std;
 
/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++) 
#define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define REP(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n) - 1; i >= 0; i--)
#define all(i) (i).begin(),(i).end()
#define pb push_back
#define mp make_pair 
 
typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;
/*-------------------------------*/
 
int main(void)
{
  int a[3];
  char b[2];
  int rect = 0, rhom = 0;
  
  while (cin >> a[0] >> b[0] >> a[1] >> b[1] >> a[2]){
    if (a[0] == a[1]) rhom++;
    else if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) rect++;
  }
  cout << rect << "\n" << rhom << endl;

  return 0;
}

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

using namespace std;

int main() {
	int n, m, l;
	int rectangles = 0, lozenges = 0;
	while (scanf("%d,%d,%d", &n, &m, &l) != EOF) {
		if (n * n + m * m == l * l)
			rectangles++;
		else if (n == m)
			lozenges++;
	}
	printf("%d\n%d\n", rectangles, lozenges);
	return 0;
}

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

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

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
#include <bitset>
using namespace std;
#define FOR(I,F,N) for(int I = F; I < (int)(N); I++)
#define rep(i, n) FOR(i, 0, n)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};

int main(void){
	char cc;
	int a,b,c;
	int hisi = 0;
	int cho = 0;
	while(cin >> a >> cc >> b >> cc >> c){
		if(a != b && b != c && a != c)cho++;
		else hisi++;
	}
	FIN(cho);
	FIN(hisi);

	return 0;
}