#include<iostream>
#include<algorithm>
using namespace std;

int a,b,c,tyo,hi;

int main(){
	while(cin>>a>>b>>c){
		if(c*c==a*a+b*b) tyo++;
		if(a==b) hi++;
	}
	cout<<tyo<<endl<<hi<<endl;

	return 0;
}