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