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

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