#include <bits/stdc++.h>
using namespace std;
bool slove(int n, int a, int b, int c) {
  if (n == 1) {
    if (c * c == a * a + b * b) return true;
  }
  if (n == 2) {
    if ((a == b || b == c || c == a) && !(a == b && b == c && c == a))
      return true;
  }
  return false;
}
int main() {
  int a, b, c, con_h = 0, con_t = 0;
  vector<int> n;
  bool flag;
  while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
    n.clear();
    n.push_back(a);
    n.push_back(b);
    n.push_back(c);
    sort(n.begin(), n.end());
    vector<int>::iterator it = n.begin();
    flag = slove(1, *it, *(it + 1), *(it + 2));
    if (flag == true)
      con_h++;
    else {
      flag = slove(2, *it, *(it + 1), *(it + 2));
      if (flag == true) con_t++;
    }
  }
  cout << con_t << endl << con_h << endl;
}
