#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b;
  int c;
  　　 int rectangular = 0, rhombus = 0;
  while (cin.fail()) {
    cin >> a >> b >> c;
    if (a != b && a + b >= c && a * a + b * b == c * c)
      rectangular++;
    else if (a == b && a + b >= c)
      rhombus++;
  }
  cout << rectangular << endl;
  cout << rhombus << endl;
}
