#include <iostream>
#include <algorithm>
using namespace std;

int main() {
  int a, b, c;
  char d;
  int rhombus = 0, rectangle = 0;
  while (cin >> a >> d >> b >> d >> c) {
    if (a + b > c) {
      if (a == b) {
        rhombus++;
      } else if (a * a + b * b == c * c) {
        rectangle++;
      }
    }
  }
  cout << rectangle << endl;
  cout << rhombus << endl;
  return 0;
}

