#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, x, ob = 0, dia = 0;
  while (scanf("%d %d %d", &a, &b, &x) != EOF) {
    if (x * x == a * a + b * b)
      ob++;
    else if (a == b)
      dia++;
  }
  cout << ob << endl << dia << endl;
  return 0;
}
