#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3];
  char del;
  int rect = 0, loz = 0;
  while (cin >> a[0] >> del >> a[1] >> del >> a[2]) {
    if (abs(a[0] - a[1]) < a[2] && a[2] < a[0] + a[1]) {
      if (!(a[0] == a[1] && a[1] == a[2])) {
        if (a[2] * a[2] == a[1] * a[1] + a[0] * a[0])
          rect++;
        else
          loz++;
      }
    }
  }
  cout << rect << endl;
  cout << loz << endl;
  return 0;
}
