#include <bits/stdc++.h>
using namespace std;
int main() {
  int rectangle = 0, rhombus = 0, a, b, c;
  char str[6];
  while (cin >> str) {
    a = str[0] - '0';
    b = str[2] - '0';
    c = str[4] - '0';
    if (a == b)
      rhombus++;
    else if (a * a + b * b == c * c)
      rectangle++;
  }
  cout << rectangle << endl << rhombus << endl;
}
