#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[4];
  char ch;
  int r = 0, l = 0;
  while (scanf("%d%c%d%c%d", &a[0], &ch, &a[1], &ch, &a[2]) != EOF) {
    if ((a[0] * a[0]) + (a[1] * a[1]) == (a[2] * a[2]))
      r++;
    else if (a[0] == a[1] || a[1] == a[2])
      l++;
  }
  printf("%d\n%d\n", r, l);
  return 0;
}
