using System;
using System.Linq;

namespace At
{
    class Program
    {
        static void Main(string[] args)
        {
            int tyou = 0, hishi = 0;
            string[] str = Console.ReadLine().Split(',');
            while (str[0] != "")
            {
                int x = int.Parse(str[0]);
                int y = int.Parse(str[1]);
                int z = int.Parse(str[2]);
                if (x * x + y * y == z * z)
                {
                    tyou++;
                }
                else if (x == y)
                {
                    hishi++;
                }
                str = Console.ReadLine().Split(',');
            }
            Console.WriteLine(tyou);
            Console.WriteLine(hishi);

        }
    }
}