#include <bits/stdc++.h>
int main() {
  int IA, IB, IC;
  int T, H;
  int A, B, C;
  T = H = 0;
  while (scanf("%d,%d,%d", &IA, &IB, &IC) != EOF) {
    B = (IA == IB);
    C = (IA * IA + IB * IB == IC * IC);
    if (B && !C) H++;
    if (!B && C) T++;
  }
  printf("%d\n%d", T, H);
  return 0;
}
