#include <iostream>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <cstdio>

using namespace std;



int main(){
	int a, b, c;
	int m = 0, n = 0;

	while(scanf("%d,%d,%d", &a, &b, &c) != EOF){
		if(a*a+b*b == c*c) m++;
		if(a == b)n++;
	}
	cout << m << endl << n << endl;

	return 0;
}