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

int main() {
	int sides[3]; int square=0,para=0;
	while (scanf("%d,%d,%d", &sides[0], &sides[1], &sides[2]) != EOF) {
		//??£?????¢???check
		if (sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2]) {
			square++; para++;
		}
		//??????????????¢???check
		else if (sides[0] == sides[1]) {
			para++;
		}
		cout << square << endl << para << endl;
	}