using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Magatro { static void Main() { long m = long.Parse(Console.ReadLine()); int rootm; if (m > 1000000) { rootm = 1000000; } else { rootm = (int)m-1; } for(int i = rootm; i >= 1; i--) { if (m % i == 0) { Console.WriteLine(i + " " + m / i); return; } } } }