using System; using System.Collections.Generic; using System.Text; namespace New { class Program { static void Main(string[] args) { long a = Convert.ToInt32(Console.ReadLine()); long b = 1; long[] c=new long [100000]; long[] d=new long [100000]; c[0] = 0; while (a % 2 == 0) { c[0]+= 1; d[0]=2; b = 2; a /= 2; } long k = Convert.ToInt32(d[0]==2); for (int i = 3; a > 1; i = i + 2) { if (a % i == 0) { k++; b *= i; d[k] = i; c[k] = 0; while (a % i == 0) { a /= i; c[k] += 1; } } } long n=1; for (int i = 0; i < k; i++) { if (c[i] > n) {n *= d[i]; i--;} } Console.WriteLine(n); } } }