#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans_a = 0, ans_b = 0;
  for (;;) {
    int a, b, c;
    scanf("%d,%d,%d", &a, &b, &c);
    if (a * a + b * b == c * c) {
      ans_a++;
    }
    if (a == b) {
      ans_b++;
    }
  }
  cout << ans_a << endl << ans_b << endl;
  return 0;
}
