import math



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



if N == 1:

    print(P)

else:

    for i in range(1, round(math.pow(P, 1 / N)) + 1):

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

            now_max = i

    

    print(now_max)
import math

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



for i in reversed(list(range(1, round(math.pow(P, 1 / N)) + 1))):

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

        print(i)

        break

import math

N, P = list(map(int, input().split()))
if N == 1:
    print(P)
else:
    for i in range(1, round(math.pow(P, 1 / N)) + 1):
        if P % (i**N) == 0:
            now_max = i
    print(now_max)

import math

N, P = list(map(int, input().split()))
for i in reversed(list(range(1, round(math.pow(P, 1 / N)) + 1))):
    if P % (i**N) == 0:
        print(i)
        break

-if N == 1: -    print(P) -else: -    for i in range(1, round(math.pow(P, 1 / N)) + 1): -        if P % (i**N) == 0: -            now_max = i -    print(now_max) +for i in reversed(list(range(1, round(math.pow(P, 1 / N)) + 1))): +    if P % (i**N) == 0: +        print(i) +        break