#include <bits/stdc++.h>
using namespace std;

int main() {
  int a, b, c, r = 0, L = 0;
  char d;
  while (cin >> a >> d >> b >> d >> c) {
    if (a * a + b * b == c * c) r++;
    else if (a == b) L++;
  }
  cout << r << "\n" << L << "\n";
}
