#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  int a, b, c;
  char c1, c2;
  int ans1 = 0, ans2 = 0;
  while (cin >> a >> c1 >> b >> c2 >> c) {
    if (a * a + b * b == c * c)
      ++ans1;
    else if (a == b)
      ++ans2;
  }
  cout << ans1 << endl << ans2 << endl;
}
