using System;
using System.Linq;


class Program
{
    static void Main(string[] args)
    {
        int x = 0, y = 0;////
        while (true)
        {
            string st = Console.ReadLine();
            if (st == null) { break; }
            int[] a = st.Split(',').Select(int.Parse).ToArray();
            //Array.Sort(a);
            if (a[0]*a[0]+a[1]*a[1]==a[2]*a[2]) { x++; }
            if (a[0] == a[1]&&a[2]>a[1]) { y++; }
        }
        Console.WriteLine(x);
        Console.WriteLine(y);
    }
}