#include <bits/stdc++.h>
using namespace std;
int t = 0, h = 0, l1, l2, l3;
int main() {
  while (scanf("%d,%d,%d", &l1, &l2, &l3) != EOF) {
    if (pow(l3, 2) == pow(l1, 2) + pow(l2, 2)) {
      t++;
    }
    if (l1 == l2 || l2 == l3 || l3 == l1) {
      h++;
    }
  }
  cout << t << "\n" << h << "\n";
}
