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