#include<iostream>
#include<stdio.h>
using namespace std;

int x, y, z;

int re=0, di=0;

int main(){
	while(scanf("%d,%d,%d", &x, &y, &z) != EOF){
		if(x*x + y*y == z*z) re++;
		else if(x == y) di++;
	}
	cout << re << endl;
	cout << di << endl;
}