Buggy python submission (verdict: Time Limit Exceeded):
import math

N, P = list(map(int, input().split()))

for i in range(1, round(math.pow(P, 1 / N)) + 1):
    if P % (i ** N) == 0:
        now_max = i

print(now_max)

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

Buggy python submission (verdict: Time Limit Exceeded):
import math

N, P = list(map(int, input().split()))

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


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

Buggy python submission (verdict: Time Limit Exceeded):
import math

N, P = list(map(int, input().split()))

if N == 1:
    print(P)
else:
    now_max = 1
    
    for i in range(int(math.pow(P, 1 / N)) + 1, 0, -1):
        if P % (i ** N) == 0:
            now_max = i
            break
    
    print(now_max)

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

Buggy python submission (verdict: Time Limit Exceeded):
import math

N, P = map(int, input().split())

now_max = 1

for i in range(int(math.pow(P, 1 / N)) + 1, 0, -1):
    if P % (i ** N) == 0:
        now_max = i
        break

print(now_max)

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

Buggy python submission (verdict: Time Limit Exceeded):
N, P = list(map(int, input().split()))

now_max = 1

for i in range(round(P ** (1 / N)) + 1, 0, -1):
    if P % (i ** N) == 0:
        now_max = i
        break

print(now_max)

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

Buggy python submission (verdict: Time Limit Exceeded):
import math

N, P = list(map(int, input().split()))

now_max = 1

for i in range(round(math.pow(P, 1 / N)) + 1, 0, -1):
    if P % (i ** N) == 0:
        now_max = i
        break

print(now_max)

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

Buggy python submission (verdict: Time Limit Exceeded):
import math

N, P = list(map(int, input().split()))

now_max = 1

for i in range(int(math.pow(P, 1 / N)) + 1, 0, -1):
    if P % (i ** N) == 0:
        now_max = i
        break

print(now_max)

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

Buggy python submission (verdict: Time Limit Exceeded):
N, P = list(map(int, input().split()))

now = 1

x = 2
while P >= x ** N:
    while P % (x ** N) == 0:
        now *= x
        P = P / (x ** N)
    while P % x == 0:
        P = P / x
    x += 1

print(now)

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

Buggy python submission (verdict: Time Limit Exceeded):
N, P = list(map(int, input().split()))

now = 1

x = 2
while P >= x ** N:
    if P % x == 0:
        while P % (x ** N) == 0:
            now *= x
            P = P / (x ** N)
        while P % x == 0:
            P = P / x

    x += 1


print(now)

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

Buggy python submission (verdict: Time Limit Exceeded):
N, P = list(map(int, input().split()))

now = 1

x = 2
while P > 1:
    if P % x == 0:
        while P % (x ** N) == 0:
            now *= x
            P = P / (x ** N)
        while P % x == 0:
            P = P / x

    x += 1


print(now)

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

Buggy python submission (verdict: Runtime Error):
import math
N, P = list(map(int, input().split()))


def cal(x):
    if P % (x ** N) == 0:
        return x
    else:
        return cal(x-1)


print(cal(int(math.pow(P, 1/ N))+1))

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

Buggy python submission (verdict: Runtime Error):
import math
N, P = list(map(int, input().split()))

def cal(x):
    if P % (x ** N) == 0:
        return x
    return cal(x-1)

print(cal(int(math.pow(P, 1/ N))+1))

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

Buggy python submission (verdict: Time Limit Exceeded):
import math
N, P = list(map(int, input().split()))

now_max = 1

for i in range(int(math.pow(P, 1/N))+1, 0, -1):
    if P % (i ** N) == 0:
        now_max = i
        break

print(now_max)

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

Buggy python submission (verdict: Time Limit Exceeded):
N, P = list(map(int, input().split()))

now_max = 1
for i in range(1, P+1):
    if P % (i ** N) == 0:
        now_max = i
    if P < i ** N:
        break

print(now_max)

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