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