#include <bits/stdc++.h>
using namespace std;
const bool test = false;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
unsigned long long mod = (int)1e9 + 7;
const int MAX = (int)2e5 + 5;
int main() {
  int a, b, c;
  int res1 = 0;
  int res2 = 0;
  while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
    if (c == (long long)(hypot(a, b) + 1e-6)) res1++;
    if (a == b && 2 * a > c) res2++;
  }
  cout << res1 << endl;
  cout << res2 << endl;
  return 0;
}
