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