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

int max(int x, int y) {
  return (x > y) ? x : y;
}

int main() {
  int a, b, c;
  int r, l;

  r = l = 0;
  while (scanf("%d,%d,%d", &a, &b, &c)==3) {
    if (a*a+b*b==c*c) r++;
    if (a==b) l++;
  }
  printf("%d\n", r);
  printf("%d\n", l);

  return 0;
}