#include <bits/stdc++.h>
using namespace std;

int main() {
	ios_base::sync_with_stdio( false );

	int x = 0;
	int y = 0;

	int a, b, c;
	char d;
	while( cin >> a >> d >> b >> d >> c ) {
		if( a == b ) {
			x += 1;
		}
		else if( a*a + b*b == c*c ) {
			y += 1;
		}
	}

	cout << y << '\n' << x << '\n';
}

