#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  int l = 0, h = 0;
  while (cin >> a >> b >> c) {
    if (pow(a, 2) + pow(b, 2) == pow(c, 2)) {
      if (a == b)
        if (a != c)
          ++h;
        else
          ++l;
    }
  }
  cout << l << endl << h << endl;
  return 0;
}
