#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  char d;
  int t = 0, h = 0;
  while (cin >> a >> d >> b >> d >> c) {
    if (c * c == (a * a + b * b)) t++;
    if ((a == b) || (b == c) || (a == c)) h++;
  }
  cout << t << endl << h << endl;
  return 0;
}
