#include<iostream>
using namespace std;
int main(){
  int s[3],hi=0,tyo=0;
  char c[2];
  while(cin>>s[0]>>c[0]>>s[1]>>c[1]>>s[2]){
    if(s[0]!=s[1]&&s[2]*s[2]==s[0]*s[0]+s[1]*s[1]) tyo++;
    else if(s[0]==s[1]) hi++;
  }
  cout << tyo << endl << hi << endl;
  return 0;
}