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