#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b;
  int t;
  int countt = 0;
  int counth = 0;
  char input[100];
  while (!cin.eof()) {
    cin >> input;
    a = input[0] - '0';
    b = input[2] - '0';
    t = input[4] - '0';
    if (a * a + b * b == t * t) {
      if (a == b)
        ++counth;
      else
        ++countt;
    } else if (a == b)
      ++counth;
  }
  cout << countt << endl;
  cout << counth << endl;
  system("pause");
  return 0;
}
