#include <iostream>
using namespace std;

int main() {

  long long int in_0, in_1, in_2;
  char in_c;

  long long int ans_0 = 0;
  long long int ans_1 = 0;

  while( cin >> in_0 >> in_c >> in_1 >> in_c >> in_2 ) {
    if ( in_0 * in_0 + in_1 * in_1 == in_2 * in_2 ) {
      ans_0++;
    }
    if ( in_0 == in_1 ) {
      ans_1++;
    }
  }
  cout << ans_0 << endl << ans_1 << endl;

  return 0;

}