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