Buggy python submission (verdict: Time Limit Exceeded):
n, p = [int(i) for i in input().split()]
max_x = int(p**(1/n))+1
ans = 1
for i in range(max_x, 1, -1):
    if p >= pow(i,n) and p % pow(i,n) == 0:
        ans = i
        break
print(ans)

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def pow_r(x, n):
    """
    O(log n)
    """
    if n == 0:  # exit case
        return 1
    if n % 2 == 0:  # standard case ① n is even
        return pow_r(x ** 2, n // 2)
    else:  # standard case ② n is odd
        return x * pow_r(x ** 2, (n - 1) // 2)

n, p = [int(i) for i in input().split()]
max_x = int(p**(1/n))
ans = 1

if n >= p:
    print(1)
else:
    for i in range(max_x+1, 1, -1):
        if p % pow_r(i,n) == 0:
            ans = i
            break
    print(ans)

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)

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

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
n, p = [int(i) for i in input().split()]
max_x = int(p**(1/n))
ans = 1
if n >= p:
    print(1)
else:
    for i in range(max_x+1, 1, -1):
        if p % int(math.pow(i,n)) == 0:
            ans = i
            break
    print(ans)

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)

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

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
n, p = [int(i) for i in input().split()]
max_x = int(p**(1/n))
ans = 1
if n >= p:
    print(1)
else:
    for i in range(max_x+1, 1, -1):
        if p % math.pow(i,n) == 0:
            ans = i
            break
    print(ans)

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)

Buggy python submission (verdict: Runtime Error):
import math
n, p = [int(i) for i in input().split()]
max_x = int(p**(1/n))
ans = 1
for i in range(max_x+1, 1, -1):
    if p % math.pow(i,n) == 0:
        ans = i
        break
print(ans)

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)

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

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)

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

Fixed submission:
n, p = [int(i) for i in input().split()]
tmp = p**(1/n)
if tmp - int(tmp) > 0.999:
    max_x = int(tmp) + 1
else:
    max_x = int(tmp)
ans = 1
for i in range(max_x, 1, -1):
    if p % pow(i,n) == 0:
        ans = i
        break
print(ans)