#include <iostream>
using namespace std;

int main(){
	char trash;
	int hisi = 0, tyou = 0;
	int a, b, c;
	while(cin >> a >> trash >> b >> trash >> c){
		if(a == b){
			hisi++;
		}
		if(a*a+b*b == c*c){
			tyou++;
		}
	}
	cout << tyou << endl << hisi << endl;
}