#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 0, h = 0;
  set<vector<int> > T, H;
  int a, b, c;
  string buf;
  while (cin >> buf) {
    sscanf(buf.c_str(), "%d,%d,%d", &a, &b, &c);
    cout << a << b << c;
    vector<int> all;
    all.push_back(a);
    all.push_back(b);
    all.push_back(c);
    sort(all.begin(), all.end());
    if (all[0] == all[1] || all[1] == all[2])
      ;
    else if (all[1] == all[2])
      H.insert(all);
    if (all[0] * all[0] + all[1] * all[1] == all[2] * all[2]) T.insert(all);
  }
  cout << T.size() << endl << H.size() << endl;
  return 0;
}
