#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int a, b, c;
  char ch;
  int p = 0, q = 0;
  while (cin >> a >> ch >> b >> ch >> c) {
    p += (a * a + b * b == c * c);
    q += (a == b);
  }
  cout << p << endl;
  cout << q << endl;

  return 0;
}
