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