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

namespace program1
{
    class Program
    {

        static void Fact(int n)
        {
            int f = 1;
            for (int i = 1; i <= n; i++)
            {
                f *= i;
            }

            Console.Write("Fact of " + n + "is :" + f);

        }

        static void M(int n)
        {
            for (int i = 1; i <= n; i++)
            {
                if (n % i == 0)
                {
                    Console.Write(i + " ");
                }
            }
        }

        static void ShowMenu()
        {
            Console.WriteLine("Press F or f to run Fact()");
            Console.WriteLine("Press M or m to run M()");
            Console.Write("Now Choose your option :");
        }



        static void Main(string[] args)
        {
            int n;
            char option;
            Console.Write("Enter n : ");
            n = int.Parse(Console.ReadLine());
            L1: ShowMenu();
            option = char.Parse(Console.ReadLine());

            if (option == 'm' || option == 'M')

                M(n);
            else
            {
                if (option == 'f' || option == 'F')
                    Fact(n);
                else
                {
                    Console.WriteLine("You Choose a wrong option...!\n\n");
                    goto L1;
                }
            }

           





            Console.ReadLine();
          
        }
    }
}