#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int rect_num = 0;
  int diam_num = 0;
  while (getline(cin, str, ',')) {
    string str2;
    getline(cin, str2, ',');
    string str3;
    getline(cin, str3);
    int edge1 = atoi(str.c_str());
    int edge2 = atoi(str2.c_str());
    int diag = atoi(str3.c_str());
    if (edge1 + edge2 <= diag || (edge1 == edge2 && edge1 == diag)) continue;
    if (edge1 == edge2) {
      diam_num++;
    } else {
      rect_num++;
    }
  }
  printf("%d\n%d\n", rect_num, diam_num);
}
