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