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