#include <bits/stdc++.h>
using namespace std;
void solve() {
  int rect = 0;
  int diamond = 0;
  int a, b, c;
  while (~scanf("%d,%d,%d", &a, &b, &c)) {
    if (a == 0 || b == 0 || c == 0) {
      continue;
    }
    if (a != b) {
      if (a * a + b * b == c * c) {
        ++rect;
      }
    } else {
      if (2 * a > c && 2 * c > a) {
        ++diamond;
      }
    }
  }
  cout << rect << endl;
  cout << diamond << endl;
}
int main() {
  solve();
  return (0);
}
