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

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

Buggy python submission (verdict: Runtime Error):
n,p= map(int,input().split())
if 2 >= int(p**(1/n))+2):
    print(1)
else: print(0)

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

Buggy python submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
else:
    for i in range(2,int(p**(1/n))+2):
        x=i**n
        if x>p:
            break
        if p%x==0:
            res=i
print(res)

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

Buggy python submission (verdict: Time Limit Exceeded):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
else:
    for i in range(2,int(pow(p,1/n))+2):
        x=pow(i,n)
        if x>p:
            break
        if p%x==0:
            res=i
print(res)

Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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


Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

Buggy python submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
elif n==2:
    for i in range(int(pow(p,1/2)),int(pow(p,1/2))+2):
        if x>p:
            break
        if p%x==0:
            res=i
else:
    for i in range(2,int(pow(p,1/n))+2):
        x=i**n
        if x>p:
            break
        if p%x==0:
            res=i
print(res)


Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

Buggy python submission (verdict: Runtime Error):
n,p= map(int,input().split())
res=1
if n==1:
    res=p
elif n==2:
    for i in range(int(pow(p,1/2)),int(pow(p,1/2))+2):
else:
    for i in range(2,int(pow(p,1/n))+2):
        x=i**n
        if x>p:
            break
        if p%x==0:
            res=i
print(res)


Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

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


Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()

Buggy python submission (verdict: Runtime Error):
import sys
def soin(n):
    I=n
    s=0
    R=int(I)
    L=[]
    while s==0:
        for i in range(2,R+1):
            if I%i==0:
                I=I/i
                if I==1:
                    s=1
                L.append(i)
                break
    if len(L)==1:
        print(R)
    else:
        print(L)

n,p= map(int,input().split())
if n==1:
    print(p)
    sys.exit()
l=soin(p)
if len(l)<n:
    print(1)
    sys.exit()
print(min(l))



Fixed submission:
n,p= map(int,input().split())
for i in range(round(p**(1/n)),0,-1):
    if p%(i**n)==0:
        print(i)
        exit()