#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  int r = 0, l = 0;
  while (scanf("%d,%d,%d", &a, &b, &c) == 3) {
    if (pow(c, 2) == pow(a, 2) + pow(b, 2)) {
      ++r;
    } else if (a == b) {
      l++;
      cout << a << ":" << b << ":" << c << endl;
    }
  }
  cout << r << endl << l << endl;
  return 0;
}
