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