#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3], t, h;
  char d;
  t = h = 0;
  for (int i = 0; i < 4; i++) {
    cin >> a[0] >> d >> a[1] >> d >> a[2];
    if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
      t++;
    else if (a[0] == a[1])
      h++;
  }
  cout << t << endl << h << endl;
}
