#include <iostream>
#include<cstdio>
using namespace std;

int main() {
	int a,b,c,n1=0,n2=0;
	while(scanf("%d,%d,%d",&a,&b,&c)>0){
		if(a==b && a*a+b*b==c*c) continue;
		if(a*a+b*b==c*c) n1++;
		if(a==b) n2++;
	}cout<<n1<<endl<<n2<<endl;
}