#include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e;
int main() {
  while (cin >> a >> b >> c) {
    if (a * a + b * b == c * c) {
      d++;
    }
    if (a == b) {
      e++;
    }
  }
  cout << d << endl << e << endl;
}
