﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DevidingWithout
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());

            double sum1 = 0.0;
            double sum2 = 0.0;
            double sum3 = 0.0;
            double p1 = 0.00;
            double p2 = 0.0;
            double p3 = 0.0;

            for (var i = 1; i <= n; i++)
            {
                var num = int.Parse(Console.ReadLine());

                if (num % 2 == 0)
                {
                    sum1++;

                    if (num >= 4 && num % 4 == 0)
                    {
                        sum3++;
                    }
                    if (num % 3 == 0 && num % 2 == 0)
                    {
                        sum2++;
                    }
                }
                else if (num % 3 == 0)
                {
                    sum2++;
                }

                p1 = (sum1 * 100) / n;
                p2 = (sum2 * 100) / n;
                p3 = (sum3 * 100) / n;

            }
            Console.WriteLine("{0:f2}%", p1);
            Console.WriteLine("{0:f2}%", p2);
            Console.WriteLine("{0:f2}%", p3);
        }
    }
}
