#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, hantei, t = 0, h = 0;
  while (cin >> a >> b >> c) {
    if (a == b || b == c || a == c) {
      h++;
    } else if (a > b) {
      if (b > c) {
        if (a * a - b * b - c * c == 0) {
          t++;
        }
      } else if (c > b && c < a) {
        if (a * a - b * b - c * c == 0) {
          t++;
        }
      }
    } else if (b > a) {
      if (a > c) {
        if (b * b - a * a - c * c == 0) {
          t++;
        }
      } else if (c > a && c < b) {
        if (b * b - a * a - c * c == 0) {
          t++;
        }
      }
    } else {
      if (a > b) {
        if (c * c - b * b - c * c == 0) {
          t++;
        }
      } else if (b > a && b < c) {
        if (c * c - b * b - c * c == 0) {
          t++;
        }
      }
    }
  }
  cout << t << endl;
  cout << h << endl;
  return 0;
}
