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