#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cassert>
 
using namespace std;
 
 
bool solve(){
    int a,b,x;
    char ch, ch2;
    int ans = 0, ans2 = 0;
    while(cin>>a){
        cin>> ch>> b>> ch2>> x;
        if(a*a + b*b == x*x) ans++;
        if(a == b) ans2++;
    }
    cout<< ans<< endl;
    cout<< ans2<< endl;
    return true;
}
 
int main(){
    cout.setf(ios::fixed);
    cout.precision(10);
    solve();
     
    return 0;
}