#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<stdio.h>
#include<queue>
#include <climits>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int mod = 1e9 + 7;
const long long INF = 1LL << 60;

int main() 
{
    string s;
    int t = 0,h = 0;
    int a,b,c;
    while(scanf("%d,%d,%d",&a,&b,&c)+1){
        if(a * a + b * b == c * c) t++;
        else if(a == b) h++;
    }
    cout << t << endl;
    cout << h << endl;
}



