#include <bits/stdc++.h>
int main() {
  int a, b, c;
  int t = 0, h = 0;
  while (scanf("%d %d %d", &a, &b, &c) != EOF) {
    if (a == b) h++;
    if (a * a + b * b == c * c) t++;
  }
  printf("%d\n%d\n", t, h);
  return 0;
}
