#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int main() {
  int a, b, c;
  int t(0), h(0);
  while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
    if (a + b < c || a + c < b || b + c < a || !a || !b || !c) continue;
    if (a * a + b * b == c * c)
      ++t;
    else if (a == b)
      ++h;
    cout << t << endl << h << endl;
  }
  return 0;
}
