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