#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;

int main() {
	int a, b, c;
	int a1 = 0, a2 = 0;
	char ch;

	while (cin >> a >> ch >> b >> ch >> c) {
		int x =a * a + b * b;
		if (x == c*c) {
			a1++;
		}
		else {
			if (a == b) {
				a2++;
			}
		}
	}

	cout << a1 << endl;
	cout << a2 << endl;
}
