#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
  int a,b,c,h=0,s=0;
  while(scanf("%d,%d,%d",&a,&b,&c)!=EOF) {
      if (a==b) h++;
	  if (a*a+b*b==c*c) s++;
  }
  cout << s << endl << h << endl;
  return 0;
}