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