#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, ans1 = 0, ans2 = 0, n = 100;
  char x[3];
  while (cin >> a && a != EOF && n-- && n != 0) {
    cin >> x[0] >> b >> x[1] >> c;
    if (a * a + b * b == c * c) ans1++;
    if (a == b || a == c || b == c) ans2++;
  }
  cout << ans1 << endl << ans2 << endl;
  return 0;
}
