#include <bits/stdc++.h>
using namespace std;
int main() {
  double side1, side2, diagonal, rectangle, rhombus;
  while (cin >> side1 >> side2 >> diagonal) {
    if (pow(side1, 2.0) + pow(side2, 2.0) == pow(diagonal, 2.0) &&
        side1 != side2) {
      rectangle++;
    } else if (pow(side1, 2.0) + pow(side2, 2.0) != pow(diagonal, 2.0) &&
               side1 == side2) {
      rhombus++;
    }
  }
  cout << rectangle << endl << rhombus << endl;
}
