#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e) {
  cout << e << '\n';
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << '\n';
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << '\n';
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << '\n';
}
template <class T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
ostream_iterator<int> screen(cout, " ");
const int sz = 2 * 1000 * 100 + 10;
const int inf = INT_MAX >> 1;
const long long big = (1LL << 62);
const double pi = acos(-1.0);
int dx[] = {0, 0, 1, -1, 1, 1, -1, -1}, dy[] = {1, -1, 0, 0, 1, -1, 1, -1};
vector<int> res;
long long powermod(long long n, long long p) {
  long long x = 1, y = n % 1000000007;
  while (p) {
    if (p & 1LL) x = (y * x) % 1000000007;
    y = (y * y) % 1000000007;
    p = p >> 1LL;
  }
  return x;
}
int main() {
  int r = 0, ro = 0, a, b, c;
  char ch;
  while (cin >> a >> ch >> b >> ch >> c) {
    if (a != b && a * a + b * b == c * c)
      r++;
    else if (a == b && a + b > c)
      ro++;
  }
  cout << r << ' ' << ro << endl;
  return 0;
}
