import java.util.*; /** * Try each possible f(n) value. For 2<=x<=10^18 we know that n>=2 and f(n)<63. * For each f(n) value, find the value m such that m^f(n)=x, if such a value exists. * Then check if f(m)=f(n) by counting the divisors of m. * * @author Finn Lidbetter */ public class pd_finn { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long x = sc.nextLong(); if (x==1) { System.out.println(1); return; } long rt = (long)Math.sqrt(x) + 1; long best = -1; for (int exp=2; exp<=62; exp++) { long lo = 2; long hi = rt; long candidate = -1; while (lo<=hi) { long mid = lo + (hi - lo) / 2; long pow = 1; for (int i=0; i