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