N, P = map(int, input().split())
cnt = int(P**(1/N))+1

if P == 1:
    print(1)
elif N == 1:
    print(P)

else:
    for i in range(1, cnt):
#         print(i)
        a = P/(i**N)
        if a.is_integer():
            ans = i
#             print(ans)
        else:
            continue
    print(int(ans))