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