#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  int co = 0, cp = 0;
  while (scanf("%d,%d,%d", &a, &b, &c)) {
    if ((a * a) + (b * b) == c * c) {
      co++;
    }
    if (a == b && a + b > c) {
      cp++;
    }
    cout << co << "\n" << cp << endl;
  }
  return 0;
}
