#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
 
typedef long long ll;
typedef pair<int, int> ii;

#define EPS 1e-8

int main(){
	
	int a, b, c;
	int cnt1 = 0, cnt2 = 0;
	while(scanf("%d,%d,%d", &a, &b, &c) != EOF){
		if(a == b) cnt2++;
		else if(c * c == a * a + b * b) cnt1++;
	}

	cout << cnt1 << endl << cnt2 << endl;
	
	return 0;
}