#include <bits/stdc++.h>
using namespace std;
int main() {
  int sides[3];
  int square = 0, para = 0;
  while (scanf("%d,%d,%d", &sides[0], &sides[1], &sides[2]) != EOF) {
    if (sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2]) {
      square++;
      para++;
    } else if (sides[0] == sides[1]) {
      para++;
    }
    cout << square << endl << para << endl;
  }
}
