#include <bits/stdc++.h>
int main(void) {
  int len1, len2, len;
  int counttyo = 0;
  int counthisi = 0;
  while (scanf("%d,%d,%d", &len1, &len2, &len) != EOF) {
    if (len * len == len1 * len1 + len2 * len2) {
      counttyo++;
    } else if ((len1 == len2) && (len > len1)) {
      counthisi++;
    } else if ((len1 == len2) && (len2 == len)) {
      counthisi++;
    }
    printf("%d\n%d\n", counttyo, counthisi);
  }
  return 0;
}
