#include <iostream>

using namespace std;

int main(){
	int a, b, c;
	int cho=0;
	int hi=0;

	while(cin >> a >> " " >> b >> " " >> c){


		if(a*a + b*b = c*c){
			cho = cho + 1;
		}
		if(a==b){
			hi = hi + 1;
		}
	}
	cout << cho << endl;
	cout << hi << endl;
}