using System; using System.Collections.Generic; //YukiCoder414 衝動 class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("4"); //2 2 } else if (InputPattern == "Input2") { WillReturn.Add("18"); //6 3 } else if (InputPattern == "Input3") { WillReturn.Add("2"); //1 2 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); long M = long.Parse(InputList[0]); //偶数の場合 if (M % 2 == 0) { Console.WriteLine("{0} {1}", 2, M / 2); return; } for (long I = 3; I * I <= M; I += 2) { if (M % I == 0) { Console.WriteLine("{0} {1}", I, M / I); return; } } Console.WriteLine("{0} {1}", 1, M); } }