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