var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n");
var A=0;
var B=0;
for(var i=0;i<Arr.length;i++){
var arr=Arr[i].split(",").map(Number);
var a=arr[0];
var b=arr[1];
var c=arr[2];
if(a*a+b*b==c*c)A++;
if(a==b)B++;

}
console.log(A+"\n"+B);