#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;
int main()
{
	vector<vector<int>> n;
	int ch = 0;
	int hisi = 0;
	int i, j,k,l = 0;
	while (scanf_s("%d,%d,%d",&i,&j,&k) != EOF) {
		vector<int>v;
		
		v.push_back(i);
		v.push_back(j);
		v.push_back(k);
		sort(&v[0], &v[2]);
		n.push_back(v);
		l++;
	}
	for (int a = 0; a < l; a++) {
		
		if ((n[a][0] ^ 2 )== ((n[a][1] ^ 2 )+ (n[a][2] ^2))) {
			if (!(n[a][0] == n[a][1] == n[a][2])) {
				ch++;
			}
		}
		else if ((n[a][0] == (n[a][1] || n[a][2])) || (n[a][1] == n[a][2])) {
			if (!(n[a][0] == n[a][1] == n[a][2])) {
				hisi++;
			}
		}
	}
	cout << ch << "\n" << hisi << endl;

	return 0;
}