#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, d;
  char c;
  int ans[2] = {0};
  while (cin >> a >> c >> b >> c >> d) {
    if (a == b)
      ans[0]++;
    else if (a * a + b * b == c * c)
      ans[1]++;
  }
  cout << ans[1] << endl;
  cout << ans[0] << endl;
}
