#include <iostream>
#include <string>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <set>
using namespace std;

int main(){
	vector<int> num(3);
	int rc, lc;
	rc = lc = 0;
	while( ~scanf("%d,%d,%d", &num[0], &num[1], &num[2]) ){
		if( num[0] == num[1] ) lc++;
		else if( num[0]*num[0]+num[1]*num[1] == num[2]*num[2] ) rc++;
	}
	cout << rc << endl;
	cout << lc << endl;
}