#include <iostream>
#include <cstdio>

using namespace std;

int main(int argc, char *argv[]) {
  int a,b,c;
  int rect = 0, diam = 0;
  while(scanf("%d,%d,%d", &a, &b, &c) != EOF) {
    if (c * c == a * a + b * b)
      rect++;
    else if (a == b)
      diam++;
  }

  cout << rect << endl;
  cout << diam << endl;
  return 0;
}