#include <bits/stdc++.h>
const int INF = 100000000;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
using namespace std;
int main() {
  int a[3];
  int cnt1 = 0, cnt2 = 0;
  while (~scanf("%d,%d,%d", &a[0], &a[1], &a[2])) {
    sort(a, a + 3);
    if (a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) cnt1++;
    if (a[0] == a[1] && a[0] < a[2]) cnt2++;
  }
  cout << cnt1 << endl;
  cout << cnt2 << endl;
  return 0;
}
