#include<iostream>
#include<sstream>
#include<fstream>
#include<cstdio>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<string>
using namespace std;

int main(){
	int a,b,c;
	int r = 0,l = 0;	
	while(scanf("%d,%d,%d",&a,&b,&c)==3){
		if(pow(c,2)==pow(a,2)+pow(b,2)){
			++r;
		}else if(a==b){
			l++;
			cout<<a<<":"<<b<<":"<<c<<endl;
		}
	}
	cout<<r<<endl<<l<<endl;
	return 0;
}