#include <bits/stdc++.h>
using namespace std;
int main() {
  int side[3];
  int iso = 0, cho = 0;
  while (cin >> side[0] >> side[1] >> side[2]) {
    if (side[0] == side[1])
      iso++;
    else if ((side[0] * side[0]) + (side[1] * side[1]) == (side[2] * side[2]))
      cho++;
  }
  cout << iso << " " << cho << endl;
  return 0;
}
