#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int cnt1 = 0, cnt2 = 0;
  while (cin >> s) {
    int a = (int)s[0] - 48, b = (int)s[2] - 48, c = (int)s[4] - 48;
    if (a == b)
      cnt2++;
    else if (a * a + b * b == c * c)
      cnt1++;
  }
  cout << cnt1 << endl << cnt2 << endl;
  return 0;
}
