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

if n == 1:

  print(p)

elif n > 40:

  print((1))

else:

  ans = 1

  i = 1

  while(True):

    if i ** n > p:

      break

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

      ans = i

    i += 1

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

ans = 1

if n == 1:

  ans = p

elif n > 40:

  pass

else:

  i = 1

  while(True):

    t = i ** n

    if t > p:

      break

    if p % t == 0:

      ans = i

    i += 1

print(ans)
n, p = list(map(int, input().split()))
if n == 1:
    print(p)
elif n > 40:
    print((1))
else:
    ans = 1
    i = 1
    while True:
        if i**n > p:
            break
        if p % (i**n) == 0:
            ans = i
        i += 1
    print(ans)

n, p = list(map(int, input().split()))
ans = 1
if n == 1:
    ans = p
elif n > 40:
    pass
else:
    i = 1
    while True:
        t = i**n
        if t > p:
            break
        if p % t == 0:
            ans = i
        i += 1
print(ans)

+ans = 1 -    print(p) +    ans = p -    print((1)) +    pass -    ans = 1 -        if i**n > p: +        t = i**n +        if t > p: -        if p % (i**n) == 0: +        if p % t == 0: -    print(ans) +print(ans)