N, P = list(map(int, input().split()))

ans = 1

 

if N >= 45:

  print(ans)

elif N == 1:

  print(P)

  

 

  

else:

  i = 1

  while(i**N <= P):

    if P % (i**N) == 0:

      ans = i

    i += 1

  print(ans)
n,p=list(map(int,input().split()))

 

if n==1:

    print(p)

elif n>45:

        print((1))



else:

    x=round((p**(1/n)+1))+1

    for i in range(x,0,-1):        

                if p%(i**n)==0:

                    print(i)

                    break

 
N, P = list(map(int, input().split()))
ans = 1
if N >= 45:
    print(ans)
elif N == 1:
    print(P)
else:
    i = 1
    while i**N <= P:
        if P % (i**N) == 0:
            ans = i
        i += 1
    print(ans)

n, p = list(map(int, input().split()))
if n == 1:
    print(p)
elif n > 45:
    print((1))
else:
    x = round((p ** (1 / n) + 1)) + 1
    for i in range(x, 0, -1):
        if p % (i**n) == 0:
            print(i)
            break

-N, P = list(map(int, input().split())) -ans = 1 -if N >= 45: -    print(ans) -elif N == 1: -    print(P) +n, p = list(map(int, input().split())) +if n == 1: +    print(p) +elif n > 45: +    print((1)) -    i = 1 -    while i**N <= P: -        if P % (i**N) == 0: -            ans = i -        i += 1 -    print(ans) +    x = round((p ** (1 / n) + 1)) + 1 +    for i in range(x, 0, -1): +        if p % (i**n) == 0: +            print(i) +            break