import math

def factrization_prime(number):

    factor = {}

    div = 2

    s = math.sqrt(number)

    while div < s:

        div_cnt = 0

        while number % div == 0:

            div_cnt += 1

            number //= div

        if div_cnt != 0:

            factor[div] = div_cnt

        div += 1

    if number > 1:

        factor[number] = 1

    return factor

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

d = factrization_prime(P)

a = 1

for p in d:

    a *= p**(d[p]//N)

print(a)

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

i=round(P**(1/N))

while 1:

    if P%(i**N)==0:print(i);exit()

    i-=1

import math


def factrization_prime(number):
    factor = {}
    div = 2
    s = math.sqrt(number)
    while div < s:
        div_cnt = 0
        while number % div == 0:
            div_cnt += 1
            number //= div
        if div_cnt != 0:
            factor[div] = div_cnt
        div += 1
    if number > 1:
        factor[number] = 1
    return factor


N, P = list(map(int, input().split()))
d = factrization_prime(P)
a = 1
for p in d:
    a *= p ** (d[p] // N)
print(a)

N, P = list(map(int, input().split()))
i = round(P ** (1 / N))
while 1:
    if P % (i**N) == 0:
        print(i)
        exit()
    i -= 1

-import math - - -def factrization_prime(number): -    factor = {} -    div = 2 -    s = math.sqrt(number) -    while div < s: -        div_cnt = 0 -        while number % div == 0: -            div_cnt += 1 -            number //= div -        if div_cnt != 0: -            factor[div] = div_cnt -        div += 1 -    if number > 1: -        factor[number] = 1 -    return factor - - -d = factrization_prime(P) -a = 1 -for p in d: -    a *= p ** (d[p] // N) -print(a) +i = round(P ** (1 / N)) +while 1: +    if P % (i**N) == 0: +        print(i) +        exit() +    i -= 1