#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[10000][3];
  int rect = 0, lozen = 0;
  map<string, bool> mp;
  ostringstream oss;
  for (int i = 0; scanf("%d,%d,%d", &a[i][0], &a[i][1], &a[i][2]) != EOF; i++) {
    sort(a[i], a[i] + 3);
    oss << a[i][0] << "," << a[i][1] << "," << a[i][2];
    if (!mp[oss.str()]) {
      mp[oss.str()] = true;
      if (a[i][0] * a[i][0] + a[i][1] * a[i][1] == a[i][2] * a[i][2])
        rect++;
      else if (a[i][0] == a[i][1])
        lozen++;
    }
    oss.clear();
    oss.str("");
  }
  cout << rect << endl << lozen << endl;
  return 0;
}
