#include <bits/stdc++.h>
using namespace std;
int main() {
  int mod = 1000000007;
  int a, b, c;
  int ans[2] = {0, 0};
  while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
    if (a == b && b == c) continue;
    int tmp = (max(a, max(b, c))) * (max(a, max(b, c))) -
              (min(a, min(b, c))) * (min(a, min(b, c)));
    if (tmp == a * a || tmp == b * b || tmp == c * c)
      ans[1] += 1;
    else if (a == b || b == c || a == c)
      ans[0] += 1;
  }
  printf("%d\n%d\n", ans[0], ans[1]);
  return 0;
}
