#include <bits/stdc++.h>
using namespace std;
int main() {
  char e, f;
  int a, b, c;
  int t = 0, h = 0;
  while (cin >> a >> e >> b >> f >> c) {
    if (a == b) {
      h++;
    }
    if (a != b) {
      t++;
    } else if (a == b && (a * a) + (b * b) == (c * c)) {
      t++;
    }
  }
  cout << t << endl;
  cout << h << endl;
  return 0;
}
