#include <bits/stdc++.h>
int main() {
  int x, y, z;
  int rectangle = 0, lozenge = 0;
  while (scanf("%d %d %d", &x, &y, &z) != EOF) {
    if (x * x + y * y == z * z) rectangle++;
    if (x == y) lozenge++;
  }
  printf("%d\n%d", rectangle, lozenge);
  return 0;
}
