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 <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main()
{
	int r_count=0,d_count=0;
	for(int a,b,c;scanf("%d,%d,%d",&a,&b,&c)==3;){
		bool rectangle=a*a+b*b==c*c;
		bool diamond=a==b;
		if(rectangle && diamond)
			;
		else if(rectangle)
			r_count++;
		else if(diamond)
			d_count++;
	}
	cout<<r_count<<endl;
	cout<<d_count<<endl;
	
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int a,b,c,ans[2]={0};
  for(;;){
    if(scanf("%d,%d,%d",&a,&b,&c) == EOF) break;
    if(c*c == a*a+b*b) ans[0]++;
    if(a == b) ans[1]++;
  }
  cout <<ans[0]<<endl<<ans[1]<<endl;
  return 0;
}

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

int main(){
int l1,l2,d,n=0,m=0;

while(scanf("%d,%d,%d",&l1,&l2,&d)+1){
if(l1==l2)++n;
else if(l1*l1+l2*l2==d*d)++m;
}
cout<<m<<endl<<n<<endl;

}

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


int main(){
    int rectangle=0,diamond=0;
    int x1,x2,diagonal;
    while(scanf("%d,%d,%d",&x1,&x2,&diagonal)!=EOF){
        if(x1*x1+x2*x2==diagonal*diagonal){
            rectangle++;
            continue;
        }else if(x1+x2>diagonal&&x1==x2){
            diamond++;
            continue;
        }
    }
    cout << rectangle << endl;
    cout << diamond << endl;
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <stack>
#include <list>
#include <queue>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <math.h>

using namespace std;

int Pythagoras(int a, int b = 0){
	return a * a + b * b;
}

int main(){
	int edge1 = 0, edge2 = 0, diagonal = 0;
	int diamond = 0, rect = 0;
	
	while(scanf("%d,%d,%d",&edge1, &edge2, &diagonal) != EOF){
		if(edge1 == edge2){
			diamond++;
		}
		else if(Pythagoras(edge1, edge2) ==  Pythagoras(diagonal)){
			rect++;
		}
	}

	cout << rect << endl << diamond << endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
&#160;&#160;
int main(){
&#160;&#160;&#160;&#160;int c = 0, h = 0;
&#160;&#160;&#160;&#160;int s1, s2, t;
&#160;&#160;&#160;&#160;char a, b;
&#160;&#160;&#160;&#160;while(cin >> s1 >> a >> s2 >> b >> t)
&#160;&#160;&#160;{
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(((s1 * s1) + (s2 * s2)) == t * t) c++;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;if(s1 == s2) h++;
&#160;&#160;&#160;&#160;}
&#160;&#160;&#160;&#160;cout << c << endl;
&#160;&#160;&#160;&#160;cout << h << endl;
&#160;&#160;&#160;&#160;return 0;
}

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

int main(){
    int a,b,c;
    char x;
    int r=0,m=0;
    while(cin>>a>>x>>b>>x>>c){
        if(a*a+b*b==c*c)r++;
        if(a==b)m++;
    }
    cout<<r<<endl
        <<m<<endl;
}

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

using namespace std;

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

  cout << dia << endl;
  cout << rect << endl;

  return 0;
}

C++: #include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main(){
  string d1,d2,d3;
  int a1,a2,a3;
  int c1,c2;
  while(getline(cin,d1,',')){
    a1 = atoi(d1.c_str());
    getline(cin,d2,',');
    a2 = atoi(d2.c_str());
    getline(cin,d3,'\n');
    a3 = atoi(d3.c_str());
    if (a1*a1+a2*a2==a3*a3)c1++;
    if (a1==a2)c2++;
    if (a1*a1+a2*a2==a3*a3&&a1==a2){
      c1--;
      c2--;
    }
  }
  cout <<c1<<endl<<c2<<endl;
  return 0;
}

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

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

C++: #include <cstdio>
int main()
{
    int x,y,z,a=0,b = 0;
    while(scanf("%d,%d,%d",&x,&y,&z)!=EOF)
    {
        if(x*x+y*y==z*z) a++;
        if(x==y) b++;
    }
    printf("%d\n%d\n",a,b);
}

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

int main()
{
	int x,y,z ;

	int oblnum = 0 ;
	int rhomnum = 0 ;

	while( cin >> x >> y >> z )
	{
		if( ((x*x)+(y*y)) == (z*z) )
		{
			oblnum ++ ;
		}

		if( x == y )
		{
			rhomnum ++ ;
		}
	}

	cout << oblnum << endl ;
	cout << rhomnum << endl ;

	return 0 ;
}

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

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

int main() {
    int a, b, c;
    string s;
    int rect = 0;
    int dia = 0;
    while(cin >> s) {
        a = s[0] - '0';
        b = s[2] - '0';
        c = s[4] - '0';
        if (a == b) {
            dia++;
            if (a*a + b*b == c*c) rect++;
        }
        else rect++;
    }
    cout << rect << endl << dia << endl;
    return 0;
}