#include<iostream>
#include<string>
//#include<sstream>
#include<algorithm>
#include<cstdio>
using namespace std;

int main(){

  int cnt_s, cnt_r, b[3];
  string str;
//  stringstream ss;

  cnt_s = 0;
  cnt_r = 0;
  while(getline(cin, str)){
//    ss << str[0] << " " << str[2] << " " << str[4];
//    ss >> b[0] >> b[1] >> b[2];
    b[0] = str[0] - '0';
    b[1] = str[2] - '0';
    b[2] = str[4] - '0';

    if(b[0] * b[0] + b[1] * b[1] == b[2] * b[2]){
      if(b[0] != b[1]){
        cnt_s++;
      }
    }
    else if(b[0] == b[1]){
      cnt_r++;
    }

//    ss.str("");
//    ss.clear(stringstream::goodbit);
  }

  cout << cnt_s << endl << cnt_r << endl;

  return 0;

}