#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000007;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
signed main() {
  long long a, b, c;
  char k;
  long long ans1 = 0, ans2 = 0;
  while (cin >> a >> k >> b >> k >> c) {
    if ((a * a + b * b) == c * c)
      ans1++;
    else if (a == b && a != c)
      ans2++;
  }
  cout << ans1 << endl;
  cout << ans2 << endl;
  return 0;
}
