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

namespace ConsoleApplication40
{
    class Program
    {
        static void Main()
        {
            int A, B;A = B = 0;
            while (true)
            {
                string C = Console.ReadLine();
                if (C == null) break;
                int[] D = C.Split(',').Select(int.Parse).ToArray();
                if (D[0] * D[0] + D[1] * D[1] == D[2] * D[2]) A++;
                if (D[0] == D[1]) B++;
            }
            Console.WriteLine(A+" "+B);
        }
    }
}