#include <bits/stdc++.h>
using namespace std;
int main() {
  int x = 0, y = 0;
  int a, b, c;
  char comma;
  while (cin >> a >> comma >> b >> comma >> c, a != 0) {
    if (pow(a, 2) + pow(b, 2) == pow(c, 2)) x++;
    if (pow(a, 2) - pow(double(c) / 2, 2) == pow(b, 2) - pow(double(c) / 2, 2))
      y++;
  }
  cout << x << endl;
  cout << y << endl;
}
