#include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;
int main() {
	int n1,n2,n3,tyo=0,hisi=0;
	while (scanf("%d,%d,%d",&n1,&n2,&n3)!=EOF) {
		if (n1 == n2)hisi++;
		if (n1*n1 + n2*n2 == n3*n3)tyo++;
	}
	cout << tyo << endl<<hisi<<endl;
	return 0;
}
