#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  int rect = 0, rhom = 0;
  while (cin >> s) {
    replace(s.begin(), s.end(), ',', ' ');
    stringstream ss(s);
    int x, y, z;
    ss >> x >> y >> z;
    if (x == y || y == z || z == x)
      rhom++;
    else if (x * x + y * y == z * z)
      rect++;
  }
  cout << rect << endl;
  cout << rhom << endl;
  return 0;
}
