#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int rectangle = 0;
  int lozenge = 0;
  int x, y, z;
  int i, n = 0;
  pair<int, pair<int, int> > tri[100];
  bool isok = true;
  while (cin >> x) {
    cin.ignore();
    cin >> y;
    cin.ignore();
    cin >> z;
    vector<int> edge;
    pair<int, int> tmp1;
    edge.push_back(x);
    edge.push_back(y);
    edge.push_back(z);
    sort(edge.begin(), edge.end());
    tmp1 = pair<int, int>(edge[1], edge[2]);
    for (i = 0; i < n; i++) {
      if (tri[i] == pair<int, pair<int, int> >(edge[0], tmp1)) {
        isok = false;
      }
    }
    if (isok) {
      tri[n++] = pair<int, pair<int, int> >(edge[0], tmp1);
      cerr << n << ":added" << edge[0] << " " << edge[1] << " " << edge[2]
           << " " << endl;
      if (edge[0] * edge[0] + edge[1] * edge[1] == edge[2] * edge[2]) {
        rectangle++;
      } else {
        lozenge++;
      }
    }
    isok = true;
  }
  cout << rectangle << endl;
  cout << lozenge << endl;
  return 0;
}
