#include <bits/stdc++.h>
int i, j, k;
int n[5], ans1 = 0, ans2 = 0;
int main() {
  while (scanf("%d %d %d", &n[0], &n[1], &n[2]) != EOF) {
    if (n[0] == n[1])
      ans1++;
    else if (n[0] * n[0] + n[1] * n[1] == n[2] * n[2])
      ans2++;
  }
  printf("%d\n%d", ans1, ans2);
  return 0;
}
