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