#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  int arr[100005][3];
  int count1 = 0;
  int count2 = 0;
  int count = 0;
  char temp, temp1;
  bool flag;
  while (cin >> a >> temp >> b >> temp1 >> c) {
    flag = false;
    arr[count][0] = a;
    arr[count][1] = b;
    arr[count][2] = c;
    sort(arr[count], arr[count] + 3);
    a = arr[count][0];
    b = arr[count][1];
    c = arr[count][2];
    count++;
    for (int i = 0; i < count - 1; i++) {
      if (a == arr[i][0] && b == arr[i][1] && c == arr[i][2]) {
        flag = true;
        break;
      }
    }
    if (!flag) {
      if (a * a + b * b == c * c)
        count1++;
      else
        count2++;
    }
  }
  cout << count1 << endl;
  cout << count2 << endl;
  return 0;
}
