#include <bits/stdc++.h>
int main(void) {
  int choho = 0, hishi = 0, x, y, z;
  while (0 < 1) {
    if (scanf("%d", &x) == -1) break;
    scanf("%d", &y);
    scanf("%d", &z);
    if (x > 0 && y > 0 && z > 0) {
      if (x == y) {
        if (z <= x + y) hishi++;
      }
      x = x * x;
      y = y * y;
      z = z * z;
      if (z == x + y) {
        choho++;
        if (x == y) hishi++;
      }
    }
  }
  printf("%d\n%d\n", choho, hishi);
  return 0;
}
