#include <bits/stdc++.h>
int main(void) {
  char str[8];
  int rec, dia;
  rec = dia = 0;
  while (scanf("%s", str) != EOF) {
    int a, b, c;
    a = str[0] - '0';
    b = str[2] - '0';
    c = str[4] - '0';
    if (a * a + b * b == c * c) {
      rec++;
    } else if (a == b) {
      dia++;
    }
  }
  printf("%d\n%d\n", rec, dia);
  return (0);
}
