#include <bits/stdc++.h>
int main(void) {
  int hen1, hen2, taikaku, tyouhou = 0, hisigata = 0;
  while (scanf("%d,%d,%d", &hen1, &hen2, &taikaku) != EOF) {
    if (sqrt(hen1 * hen1 + hen2 * hen2) == taikaku && hen1 == hen2) {
    } else if (sqrt(hen1 * hen1 + hen2 * hen2) == taikaku) {
      tyouhou++;
    } else if (hen1 == hen2) {
      hisigata++;
    }
  }
  printf("%d\n%d\n", tyouhou, hisigata);
}
