#include <iostream>
using namespace std;
int main() {
  int a, b, c, n = 0, m = 0;
  char d;
  while (cin >> a >> d >> b >> d >> c) {
    if (a * a + b * b == c * c) n++;
    if (a == b) m++;
  }
  cout << n << endl << m << endl;
}