#include <iostream>

int main()
{
    int s1, s2, diag, rect = 0, diam = 0;
    char comma;
    while (std::cin >> s1 >> comma >> s2 >> comma >> diag) {
        if (s1 * s1 + s2 * s2 == diag * diag) ++rect;
        else if (s1 == s2) ++diam;
    }
    std::cout << rect << std::endl << diam << std::endl;
}