using System;
using System.Collections.Generic;
using System.Linq;


namespace Library
{
    public class Miscelleneous
    {
        public static void print(object j){Console.WriteLine(j.ToString());}
        public static void print(string s){Console.WriteLine(s);}
        public static int cin(){return int.Parse(Console.ReadLine());}
        public static int[] cins(){
            string[] ss=Console.ReadLine().Split(',');
            var res=new int[ss.Length];
            for(int i=0;i<ss.Length;i++)
                res[i]=int.Parse(ss[i]);                
            return res;            
        }
        
        public static void Main(){
            int[] I;
            int Rect=0,Equi=0;
            while(true){
                I=cins();
                if(I.Length==0)break;
                if(I[2]*I[2]-I[0]*I[0]==I[1]*I[1])Rect++;
                if(I[0]==I[1])Equi++;
            }
            print(Rect);
            print(Equi);
        }
    }
}