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