import std.stdio,std.string,std.conv;

int main()
{
	string s;
	int count_1 = 0,count_2 = 0;
	while((s = readln.chomp).length != 0)
	{
		string[] _s = s.split(",");
		int len1 = _s[0].to!int;
		int len2 = _s[1].to!int;
		int len3 = _s[2].to!int;

		if(len3*len3 == len1*len1 + len2*len2) count_1++;
		if(len1 == len2) count_2++;
	}

	writeln(count_1);
	writeln(count_2);
	return 0;
}