#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, c;
  int x = 0, y = 0;
  while (scanf("%d,%d,%d", &a, &b, &c)) {
    if (a * a + b * b == c * c) {
      x++;
    }
    if (a == b) {
      y++;
    }
  }
  cout << x << endl << y << endl;
  return 0;
}
