#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)

int tyo=0,his=0;
int h1,h2,h3;
char t;


void solve(){
	while(cin>>h1>>t>>h2>>t>>h3){
		if(h1==h2){
			his++;
		}
		if(h3*h3==(h1*h1)+(h2*h2)){
			tyo++;
		}
	}
	cout<<tyo<<endl<<his<<endl;
}



int main(){
	solve();
	return 0;
}