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

int main() {
  int a,b,c,r=0,l=0;
  while(scanf("%d%*c%d%*c%d",&a,&b,&c)==3) {
    if(a*a+b*b==c*c) r++;
    else if(a==b) l++;
  }
  cout << r << endl << l << endl;
  return 0;
}
