using System;
namespace P10_7
{
    class LbException : Exception
    {
        public LbException() : base() { }
        public LbException(string str) : base(str) { }
        public LbException(string str, Exception inner) :
            base(str, inner) { }
        public override string ToString()
        {
            return Message;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            int[] numer = { 4, 8, 15, 32, 64, 127, 256, 512 };
            int[] denom = { 2, 0, 4, 4, 0, 8 };
            for (int i = 0; i < numer.Length; i++)
            {
                try
                {
                    if ((numer[i] % denom[i]) != 0)
                        throw new
                          LbException(numer[i] + " / " + denom[i] + " ż");
                         Console.WriteLine(numer[i] + " / " +
                                      denom[i] + " " +
                                      numer[i] / denom[i]);
                }
                catch (DivideByZeroException)
                {
                    Console.WriteLine("ܱ0");
                }
                catch (IndexOutOfRangeException)
                {
                    Console.WriteLine("ûƥԪر֡");
                }
                catch (LbException exc)
                {
                    Console.WriteLine(exc);
                }
            }
        Console.ReadLine();
}
    }
}
