using System;
using System.Linq;

namespace _0032
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 0;
            int b = 0;
            while (true)
            {
                string s = Console.ReadLine();
                if (s == null)
                {
                    break;
                }
                int[] x = s.Split(',').Select(int.Parse).ToArray();
                if (x[0] * x[0] == x[1] * x[1] + x[2] * x[2])
                {
                    a++;
                }
                else if (x[0] == x[1])
                {
                    b++;
                }
            }
            Console.WriteLine(a);
            Console.WriteLine(b);
        }
    }
}