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