Buggy python submission (verdict: Time Limit Exceeded):
from math import floor,ceil
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range(ceil(pow(P,1/N)),0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Runtime Error):
from math import ceil
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range(ceil(pow(P,1/N)),0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range(int(pow(P,1/N)//1)+2,0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range(int(pow(P,1/N)//1)+1,0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range(int(pow(P,1/N)//1)+1,0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    raise ValueError
    exit()

for i in range(int(pow(P,1/N)//1),0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range((pow(P,1/N))//1,0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Runtime Error):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range((pow(P,1/N))//1,,0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range(int(pow(P,1/N)+1),0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range(int(pow(P,1/N))+1,0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
for i in range(int(pow(P,1/N))+2,0,-1):
    if P%pow(i,N)==0:
        print(i)
        break

Fixed submission:
from collections import Counter
N,P =map(int,input().split(' '))
if N==1:
    print(P)
    exit()
prime = []
f = 2
while f**2 <=P:
    if P%f==0:
        prime.append(f)
        P//=f
    else:
        f += 1
if P != 1:
    prime.append(f)

ans = 1
for k,v in Counter(prime).items():
    if v//N:
        ans *= k**(v//N)
print(ans)