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