#include <bits/stdc++.h>
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) {
    int t = a;
    a = b;
    b = t;
  }
  int c = a % b;
  while (c != 0) {
    a = b;
    b = c;
    c = a % b;
  }
  return b;
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
bool isPrime(int x) {
  if (x == 1) return false;
  if (x == 2) return true;
  if (x % 2 == 0) return false;
  for (int i = 3; i <= sqrt(x); i += 2) {
    if (x % i == 0) return false;
  }
  return true;
}
int kaizyo(int x) {
  if (x == 1)
    return x;
  else
    return x * kaizyo(x - 1);
}
int main() {
  int a, b, c;
  char x;
  int ans1 = 0, ans2 = 0;
  while (cin >> a >> x >> b >> x >> c) {
    if (a == b && b == c) continue;
    if (a * a + b * b == c * c)
      ans1++;
    else
      ans2++;
  }
  cout << ans1 << endl << ans2 << endl;
  return 0;
}
