#include <bits/stdc++.h>
using namespace std;
int nextInt() {
  int n = -1;
  cin >> n;
  return n;
}
double nextDouble() {
  double d = -1;
  cin >> d;
  return d;
}
long long nextll() {
  long long n = -1;
  cin >> n;
  return n;
}
string nextString() {
  string str;
  cin >> str;
  return str;
}
int INF = 1LL << 25;
double EPS = 1e-9;
int numofbits(int bits) {
  bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
  bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
  bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
  bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
  return (bits & 0x0000ffff) + (bits >> 16 & 0x0000ffff);
}
int main() {
  int x[3];
  int a = 0, b = 0;
  while (scanf("%d,%d,%d", x, x + 1, x + 2) != EOF) {
    if (x[0] * x[0] + x[1] * x[1] == x[2] * x[2]) {
      a++;
    } else if (x[0] != x[1] || x[1] != x[2] || x[2] != x[0]) {
      b++;
    }
  }
  cout << a << endl << b << endl;
  return 0;
}
