import math

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

cnt = [0] * math.ceil(math.sqrt(p))

tmp = p

for i in range(2, math.ceil(math.sqrt(p))):

    while p % i == 0 and p != 0:

        p //= i

        cnt[i] += 1

ans = 1

for i in range(2, math.ceil(math.sqrt(tmp))):

    ans *= i ** (cnt[i] // n)

ans *= p ** (1 // n)

print(ans)
import math

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

ans = 1

for i in range(2, math.ceil(math.sqrt(p))):

    cnt = 0

    while p % i == 0 and p != 0:

        p //= i

        cnt += 1

    ans *= i ** (cnt // n)

ans *= p ** (1 // n)

print(ans)
import math

n, p = list(map(int, input().split()))
cnt = [0] * math.ceil(math.sqrt(p))
tmp = p
for i in range(2, math.ceil(math.sqrt(p))):
    while p % i == 0 and p != 0:
        p //= i
        cnt[i] += 1
ans = 1
for i in range(2, math.ceil(math.sqrt(tmp))):
    ans *= i ** (cnt[i] // n)
ans *= p ** (1 // n)
print(ans)

import math

n, p = list(map(int, input().split()))
ans = 1
for i in range(2, math.ceil(math.sqrt(p))):
    cnt = 0
    while p % i == 0 and p != 0:
        p //= i
        cnt += 1
    ans *= i ** (cnt // n)
ans *= p ** (1 // n)
print(ans)

-cnt = [0] * math.ceil(math.sqrt(p)) -tmp = p +ans = 1 +    cnt = 0 -        cnt[i] += 1 -ans = 1 -for i in range(2, math.ceil(math.sqrt(tmp))): -    ans *= i ** (cnt[i] // n) +        cnt += 1 +    ans *= i ** (cnt // n)