#include <cstdio>
#include <cmath>

using namespace std;

int main(void){
	int m, n, l, ans1 = 0, ans2 = 0;
	double sm, sn, sl;
	while(scanf("%d%*c%d%*c%d",&m,&n,&l) != EOF){
		sm = pow((double)m,2.0), sn = pow((double)n,2.0), sl = pow((double)l,2.0);
		if(sm + sn == sl){
			ans1++;
		}else if(m == n && 2 * m > l){
			ans2++;
		}
	}
	printf("%d\n%d\n",ans1,ans2);
	return 0;
}