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

int main() {
	int len1,len2,dia;
	int rectangle = 0,lozenge = 0;
	
	while( scanf("%d,%d,%d",&len1,&len2,&dia) == 3 ){
		if ( len1 * len1 + len2 * len2 == dia * dia ){
			rectangle++;
		} else if( len1 == len2 ) {
			lozenge++;
		}
	}
	
	cout << rectangle << endl << lozenge << endl;
	
	return 0;
}