#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt_s, cnt_r, b[3];
  string str;
  cnt_s = 0;
  cnt_r = 0;
  while (getline(cin, str)) {
    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++;
    }
  }
  cout << cnt_s << endl << cnt_r << endl;
  return 0;
}
