using System; using System.Collections.Generic; using System.Linq; namespace yukicoder { public class Program { public static void Main() { var n = long.Parse(Console.ReadLine()); var c = true; for(var i = 3; i < (long)Math.Floor(Math.Sqrt(n)); i++) { if (n % i == 0) { Console.WriteLine(i); c = false; break; } } if (c) { Console.WriteLine(n); } } } }