using System;

namespace abc_057_C
{
    class Program
    {
        static void Main(string[] args)
        {
            long a = long.Parse(Console.ReadLine());
        //    if (IsPrime(a)) { string d = "" + a + ""; Console.WriteLine(d.Length); Console.ReadLine(); }
            else
            {
                for (long i = (long)(Math.Sqrt(a)) / 1; i >= 2; i--)
                {
                    if (a % i == 0)
                    {
                        string x = "" + a / i + "";
                        string y = "" + i + "";
                        Console.WriteLine(x + " " + y);
                        Console.WriteLine(Math.Max(x.Length, y.Length)); Console.ReadLine();
                        break;
                    }
                }
            }
        }}}