Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())
 
if n==1:
  print(p)
else:
  ans=1
  anskohomax=int(p**(1/n))
  for i in range(1,anskohomax+1+1):
    if p%i**n == 0:
     ans=i
  print(ans)

Fixed submission:
n,p=map(int,input().split())

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

kekka=factorize(p)

ans=1
for i in range(len(kekka)):
    ans=ans* kekka[i][0] ** (kekka[i][1]//n)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

if n==1:
  print(p)
else:
  ans=1
  for i in range(1,int(p**(1/n))+2):
    tmp=i**n
    if (p>=tmp) and (p%tmp == 0):
     ans=i
    if(p<tmp):
      break
  print(ans)


Fixed submission:
n,p=map(int,input().split())

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

kekka=factorize(p)

ans=1
for i in range(len(kekka)):
    ans=ans* kekka[i][0] ** (kekka[i][1]//n)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

def factorizationC(n,p):
    numList=[]
    for i in range(2, int(p**(1/n))+1):
        if p % (i**n) == 0:
            numList.append(i)
            m = p // (i**n)
            j = 2
            while j <= m:
                if m % (j**n) == 0:
                    numList.append(j)
                    m = m // (j**n)
                    j = 2
                else:
                    j += 1
            break
    return numList

if n==1:
  print(p)
else:
  aaa=factorizationC(n,p)
  ans=1
  for i in range(len(aaa)):
     ans=ans*aaa[i]
  print(ans)

Fixed submission:
n,p=map(int,input().split())

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

kekka=factorize(p)

ans=1
for i in range(len(kekka)):
    ans=ans* kekka[i][0] ** (kekka[i][1]//n)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

def factorizationC(n,p):
    numList=[]
    for i in range(2, int(p**(1/n))+1):
        if p % (i**n) == 0:
            numList.append(i)
            m = p // (i**n)
            j = 2
            while j <= m:
                if m % (j**n) == 0:
                    numList.append(j)
                    m = m // (j**n)
                    j = 2
                else:
                    j += 1
            break
    return numList

aaa=factorizationC(n,p)

ans=1
for i in range(len(aaa)):
   ans=ans*aaa[i]

print(ans)

Fixed submission:
n,p=map(int,input().split())

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

kekka=factorize(p)

ans=1
for i in range(len(kekka)):
    ans=ans* kekka[i][0] ** (kekka[i][1]//n)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import time
start = time.time()

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

if n==1:
  print(p)
else:
  ans=1
  for i in range(1,100000000):
    tmp=i**n
    if (p>=tmp) and (p%tmp == 0):
     ans=i
    if(p<tmp):
      break
    now = time.time()
    if(now-start>1.5):
      break
  print(ans)


Fixed submission:
n,p=map(int,input().split())

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

kekka=factorize(p)

ans=1
for i in range(len(kekka)):
    ans=ans* kekka[i][0] ** (kekka[i][1]//n)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import time
start = time.time()

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

if n==1:
  print(p)
else:
  ans=1
  for i in range(1,100000000):
    tmp=i**n
    if (p>=tmp) and (p%tmp == 0):
     ans=i
    if(p<tmp):
      break
    now = time.time()
    if(now-start>1.9):
      break
  print(ans)


Fixed submission:
n,p=map(int,input().split())

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

kekka=factorize(p)

ans=1
for i in range(len(kekka)):
    ans=ans* kekka[i][0] ** (kekka[i][1]//n)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

if n==1:
  print(p)
else:
  ans=1
  for i in range(1,100000000):
    tmp=i**n
    if (p>=tmp) and (p%tmp == 0):
     ans=i
    if(p<tmp):
      break
  print(ans)


Fixed submission:
n,p=map(int,input().split())

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

kekka=factorize(p)

ans=1
for i in range(len(kekka)):
    ans=ans* kekka[i][0] ** (kekka[i][1]//n)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

ans=1
for i in range(1,100000000):
  tmp=i**n
  if (p>=tmp) and (p%tmp == 0):
   ans=i
  if(p<tmp):
    break
print(ans)

Fixed submission:
n,p=map(int,input().split())

def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct

kekka=factorize(p)

ans=1
for i in range(len(kekka)):
    ans=ans* kekka[i][0] ** (kekka[i][1]//n)
print(ans)