#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt_s, cnt_r, b[3], a;
  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];
    if (b[2] < b[0] + b[1]) {
      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;
}
