#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int main()
{
	int rectangle = 0, diamond = 0, l1, l2, diagonal;
	string buffer;

	while ( getline( cin, buffer ) )
	{
		for ( unsigned int i = 0; i < buffer.length(); i++ )
		{
			if ( buffer[i] == ',' )
			{
				buffer[i] = ' ';
			}
		}

		istringstream( buffer ) >> l1 >> l2 >> diagonal;

		if ( pow( l1, 2 ) + pow( l2, 2 ) == pow( diagonal, 2 ) )
		{
			rectangle++;
		}

		if ( l1 == l2 )
		{
			diamond++;
		}
	}

	cout << rectangle << ' ' << diamond << endl;
	
	return 0;
}