#include<iostream>
#include<cstdio>

using namespace std;

int main() {
  int a, b, c;
  int rect = 0;
  int dia = 0;
  while(scanf("%d,%d,%d", &a, &b, &c) != -1) {
    if(a == b && b == c && c == a) {
    }else if (a == b) {
      dia++;
    }else {
      rect++;
    }
  }

  cout << dia << endl;
  cout << rect << endl;

  return 0;
}