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

int main() {
	int a, b, c;
	int co = 0, cp = 0;
	while (scanf_s("%d,%d,%d", &a, &b, &c) + 1) {
		if ((a*a) + (b*b) == c*c) {
			co++;
		}
		if (a + b > c) {
			cp++;
		}
	}
	cout << co << "\n" << cp << endl;
	return 0;
}