#include <bits/stdc++.h>
int main(void) {
  int x, y, z;
  int countT = 0, countH = 0;
  while (scanf("%d,%d,%d", &x, &y, &z) != EOF) {
    if (x == y) countH++;
    if ((x * x) + (y * y) == (z * z)) countT++;
  }
  printf("%d\n%d", countT, countH);
  return 0;
}
