#include <bits/stdc++.h>
int main(void) {
  int l1, l2, diag;
  int rect, lozen;
  rect = lozen = 0;
  while (scanf("%d,%d,%d", &l1, &l2, &diag) != EOF) {
    if (l1 * l1 + l2 * l2 == diag * diag) {
      rect++;
    } else {
      lozen++;
    }
  }
  printf("%d\n%d\n", rect, lozen);
  return (0);
}
