#include <iostream>
#include <stdio.h>
#include <cstdio>
using namespace std;
int main(){
	int a,b,c,tyou=0,hisi=0;
	while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
		if(a*a+b*b==c*c && a!=b) tyou++;
		else if(a==b) hisi++;
	}
	cout<<tyou<<endl<<hisi<<endl;
	return 0;
}