Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	var rectangle, diamond int
	for sc.Scan() {
		l := strings.Split(sc.Text(), ",")
		a, _ := strconv.Atoi(l[0])
		b, _ := strconv.Atoi(l[1])
		c, _ := strconv.Atoi(l[2])

		if a*a+b*b == c*c {
			rectangle++
		}
		if a == b {
			diamond++
		}
	}
	fmt.Println(rectangle)
	fmt.Println(diamond)
}

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

int main(){
  int a,b,c,tyou=0,hishi=0;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		if(a*a+b*b==c*c)tyou++;
		else if(a==b)hishi++;
	}
	cout << tyou << '\n' << hishi << 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++;
    }
    cout << rect << endl << dia << endl;
    return 0;
}

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

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

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a, b, c, rect = 0, rhom = 0;
	while(cin >> a >> b >> c){
		if( a * a + b * b == c * c ) rect++;
		else if( a == b ) rhom++;
	}
	cout << rect << endl << rhom << endl;
}

C++: using namespace std;
#include <iostream>
#include <string>
#include <set>
#include <functional>
#include <vector>
#include <algorithm>
#include <stdio.h>
int main()
{
	int a,b,c;
	int cho=0,hishi=0;
	while(scanf("%d,%d,%d",&a,&b,&c)){
		if(a*a+b*b==c*c)cho++;
		if(a==b)hishi++;
	}
	printf("%d\n%d\n",cho,hishi);
    return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
typedef pair<int,int> pint;
#define rep(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
int dx[]={1,-1,0,0},dy[]={0,0,1,-1};

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

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

int main()
{
	int a, b, c;
	int r = 0;
	int l = 0;
	while (scanf("%d,%d,%d", &a, &b, &c) != EOF ) {
		if (a*a + b*b == c*c) {//??´?§?????§???¢
			r++;
		}
		else if (a == b) {//?????????????§???¢
			l++;
		}
	}
	cout << r << endl;
	cout << l << endl;
	
    return 0;
}

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

int main() {
	ios :: sync_with_stdio(false);
	char t;
	int c1 = 0, c2 = 0;
	for(int a, b, c; cin >> a >> t >> b >> t >> c; ) {
		if(a * a + b * b == c * c)
			c1 ++;
		if(a == b)
			c2 ++;
	}
	cout << c1 << '\n' << c2 << '\n';
	return 0;
}

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

using namespace std;

int main() {

	int a, b, x, ob=0, dia=0;

	while(scanf("%d %d %d", &a, &b, &x)!=EOF) {
		if(x*x==a*a+b*b)
			ob++;
		else if(a==b)
			dia++;
	}

	cout << ob << endl << dia << endl;

	return 0;

}

C++: #include <stdio.h>

int main(void) {
  int i, j, k, ansc = 0, ansh = 0, a, b, c;
  while( scanf("%d,%d,%d", &a, &b, &c) != EOF ) {
    if(a * a + b * b == c * c) ++ansc;
    if(a == b) ++ansh;
  }
  printf("%d\n%d\n", ansc, ansh);
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>

typedef long long Int; 
#pragma warning(disable : 4996)
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
#define REPS(a,i,n) for(int i = a ; i < n ; ++i)
using namespace std;




int main(){


	int a, b, c;
	int t(0), h(0);
	while (scanf("%d,%d,%d", &a, &b, &c) != EOF){
		if (a + b < c || a + c < b || b + c < a || !a || !b || !c)continue;


		if (a*a + b*b == c*c)
			++t;
		else if (a == b)
			++h;

	cout << t << endl << h << endl;
	}

	return 0;
}

C++: #include<cstdio>


using namespace std;
int main(void)
{
	int a[3],b = 0,c = 0;
	char z[2];
	while(1)
	{
		if(scanf("%d%c%d%c%d",&a[0],&z[0],&a[1],&z[1],&a[2]) == EOF) break;
		if(a[0] == a[1]) c += 1;
		if(a[2]*a[2] == a[0]*a[0]+a[1]*a[1]) b+= 1;
	}
	printf("%d\n%d\n",b,c);
	return 0;
}

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

int main(){
  int side1, side2, diagonal, rectangle = 0, rhombus = 0;

  while(1){
    if(scanf("%d,%d,%d", &side1, &side2, &diagonal) != EOF){
      if(side1 * side1 + side2 * side2 == diagonal * diagonal){
	rectangle++;
      }
      if(side1 == side2){
	rhombus++;
      }
    }else{
      printf("%d\n%d\n", rectangle, rhombus);
      break;
    }
  }

  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(z*z=x*x+y*y)N++;
else if(x==y)W++;
}
printf("%d\n%d\n",N,W);
return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
    int a,b,c,tyou = 0,hishi = 0;
    while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
        if(a*a+b*b==c*c)tyou++;
        else{
            if(a == b)hishi++;
        }
    }
 
    cout << tyou << endl << hishi << endl;
    return 0;
}

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

using namespace std;
struct Type{
  int side1,side2,diagonal;
  Type(int s1,int s2,int d):side1(s1),side2(s2),diagonal(d){}
};
int main(){
  vector<Type> data;

  int s1,s2,d;
  char c;
  while(cin>>s1>>c>>s2>>c>>d)
    data.push_back(Type(s1,s2,d));

  int dianum=0,rectnum=0;
  for(auto t:data){
    if(pow(t.side1,2)+pow(t.side2,2)==pow(t.diagonal,2)){
      if(t.side1==t.side2){
        dianum++;
      }else{
        rectnum++;
      }
    }else{
      if(t.side1==t.side2)dianum++;
    }
    
  }
  cout<<rectnum<<endl;
  cout<<dianum<<endl;
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
#include<map>
using namespace std;

int main(){
    int mod=1000000007;
    int a,b,c;
    int ans[2]={0,0};
    while (scanf("%d,%d,%d",&a,&b,&c)!=EOF) {
        if (a==b) ans[1]+=1;
        else if (a*a+b*b==c*c) ans[0]+=1;
    }
    printf("%d\n%d\n",ans[0],ans[1]);
    return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);
	
	string S;
	int t=0,h=0;
	while(cin>>S){
		int a,b,c;
		sscanf(S.c_str(),"%d,%d,%d",&a,&b,&c);
		if(a*a+b*b==c*c && max({a,b,c})==c) t++;
		else if(a==b) h++;
	}
	out(t);
	out(h);
	return 0;
}