#include <stdio.h>
#include <iostream>
 
using namespace std;
 
int main() {
 
    int a,b,c;
    int counter1 = 0;
    int counter2 = 0;
    char d;
    while (cin >> a >> d >> b >> d >> c) {
        if (c * c == a * a + b * b) {
            counter1++;
        } else if (c < a + b && a == b){
            counter2++;
        }
    }
 
    cout << counter1 << endl << counter2 << endl;
 
    return 0;
}
