#include <bits/stdc++.h>
int main(void) {
  int a, b, c, re = 0, rh = 0;
  for (; scanf("%d,%d,%d", &a, &b, &c) != EOF;) {
    if (a == b)
      rh++;
    else if (a * a + b * b == c * c)
      re++;
  }
  printf("%d\n%d", re, rh);
  return 0;
}
