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

void main(){

    int ans1=0,ans2=0;
    while(true){
	auto s = readln();
	if(stdin.eof()) break;
	int x = to!int(s[0]-'0');
	int y = to!int(s[2]-'0');
	int z = to!int(s[4]-'0');
	if(x*x+y*y==z*z)ans1++;
	else if(x==y)ans2++;
    }
    writeln(ans1);
    writeln(ans2);
}