Buggy python submission (verdict: Runtime Error):
"""
ポラード・ロー法で素因数分解
"""
n,target=map(int,input().split())
seed = 0

# 最大公約数
def gcd(a, b):
    if a<b:
        return gcd(b, a)
    while b>0:
        a, b = b, a%b
    return a

# 素数判定
def isprime(n):
    if n<2:
        return False
    for m in range(2, int(n**0.5+1)):
        if n%m==0:
            return False
    return True

# 疑似乱数発生器（らしい）
def f(n):
    ret = n**2+seed
    return ret%target

# 素数になるまで割る？
def factoring(n, _seed = 3):
    if isprime(n):
        return n
    x, y, d = 2, 2, 1
    tmp = n
    seed = _seed
    while d==1:
        x = f(x)
        y = f(f(y))
        dif = x-y if x>y else y-x
        d = gcd(dif, tmp)
        seed+=1

    seed = 0
    if(d%2==0):
        return 2
    if isprime(d) is False:
        return factoring(d, seed+1)
    return factoring(d, 1)

# メイン
def factors():
    dic = {}
    tmp = target
    if(isprime(tmp)):
        dic[tmp] = 1
        return dic

    ret = factoring(tmp)
    while tmp/ret is not 0:
        if ret in dic.keys():
            dic[ret]+=1
        else:
            dic[ret]=1
        tmp = int(tmp/ret)
        if tmp==1:
            break
        ret = factoring(tmp)

    return dic

def main():
    a=factors()
    res=1
    for b,c in a.items() :
        if c >= n : res *= b
    print(res)
    

if __name__=='__main__':
    main()

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

Buggy python submission (verdict: Runtime Error):
import sympy
 
n,p=map(int,input().split())
 
def C(N,P):
    if N == 1: return P
    
    prime=2
    prime_list={}
    while P >= prime :
        if P % prime == 0:
            P /= prime
            if prime in prime_list:
                prime_list[prime]+=1
            else:
                prime_list[prime]=1
        else :
            prime+=1
    
    print(prime_list)
    res=1
    for b,c in prime_list.items() :
        if c >= 4 : res *= b
    return res
 
print(C(n,p))

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

Buggy python submission (verdict: Runtime Error):
import sympy
 
n,p=map(int,input().split())
 
def C(N,P):
    if N == 1: return P
    a=sympy.factorint(P)
    res=1
    for b,c in a.items() :
        if c >= 4 : res *= b
    return res
 
print(C(n,p))

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

Buggy python submission (verdict: Time Limit Exceeded):
import math
 
n,p=map(int,input().split())
 
def C(N,P):
    if N == 1: return P
    
    a=math.ceil((P**(1/N)))+2
 
    res=1
    for i in range(2,a):
        if P % i**N == 0 : res = i
 
    return res
 
print(C(n,p))

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

Buggy python submission (verdict: Time Limit Exceeded):
import math
 
n,p=map(int,input().split())
 
def C(N,P):
    if N == 1: return P
    
    a=int(P**(1/(N-1)))+1
 
    res=1
    for i in range(2,a):
        if P % i**N == 0 : res = i
 
    return res
 
print(C(n,p))

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

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

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

def C(N,P):
    if N == 1: return P
    if N > 40: return 1
    b=int(math.log2(N))
    a=int(P**(1/b))+2

    res=1
    for i in range(2,a):
        c=i**N
        if P % c == 0 : res = i

    return res

print(C(n,p))

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

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

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

def C(N,P):
    if N == 1: return P
    b=int(math.log2(N))
    a=int(P**(1/b))+2

    res=1
    for i in range(2,a):
        c=i**N
        if c > P : break
        if P % c == 0 : res = i

    return res

print(C(n,p))

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

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

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

def C(N,P):
    if N == 1: return P
    b=int(math.log2(N))
    a=int(P**(1/b))+2

    res=1
    for i in range(2,a):
        if i**N > P : break
        if P % i**N == 0 : res = i

    return res

print(C(n,p))

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

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

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

def C(N,P):
    if N == 1: return P
    b=int(math.log2(N))
    a=P**(1/b)

    res=1
    for i in range(2,int(a)+2):
        if i**N > P : break
        if P % i**N == 0 : res = i

    return res

print(C(n,p))

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

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

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

def C(N,P):
    if N == 1: return P
    a=P
    N1=2
    while N >= N1:
        N1*=2
        a=math.sqrt(a)

    res=1
    for i in range(2,int(a)+2):
        if i**N > P : break
        if P % i**N == 0 : res = i

    return res

print(C(n,p))

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

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

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

def C(N,P):
    if N == 1: return P
    a=P
    N1=2
    while N >= N1:
        N1*=2
        a=math.sqrt(a)

    res=1
    for i in range(1,int(a)+2):
        if P % i**N: continue
        res = i
    return res

print(C(n,p))

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

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

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

def C(N,P):
    if N == 1: return P
    a=P
    N1=2
    while N >= N1:
        N1*=2
        a=math.sqrt(a)

    res=1
    for i in range(1,int(a)+2):
        if P % i**N: continue
        res = i
    return res

print(C(n,p))

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

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

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

def C(N,P):
    if N == 1: return P
    a=P
    if N >= 2 : a=math.sqrt(a)
    if N >= 4 : a=math.sqrt(a)
    if N >= 8 : a=math.sqrt(a)
    if N >= 16 : a=math.sqrt(a)
    if N >= 32 : a=math.sqrt(a)
    if N >= 64 : a=math.sqrt(a)
    if N >= 128 : a=math.sqrt(a)
    if N >= 256 : a=math.sqrt(a)
    if N >= 512 : a=math.sqrt(a)
    if N >= 1024 : a=math.sqrt(a)
    if N >= 2048 : a=math.sqrt(a)  
    res=1
    for i in range(1,int(a)+2):
        if P % i**N: continue
        res = i
    return res

print(C(n,p))

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

Buggy python submission (verdict: Runtime Error):
import math
import sys

n,p=map(int,input().split())
a=math.sqrt(P)

def C(N,P):
    if N == 1: return P

    if N >= 4 :
        a=math.sqrt(a)
    if N >= 8 :
        a=math.sqrt(a)
    if N >= 16 :
        a=math.sqrt(a)
    if N >= 32 :
        a=math.sqrt(a)
    if N >= 64 :
        a=math.sqrt(a)
    if N >= 128 :
        a=math.sqrt(a)
    if N >= 256 :
        a=math.sqrt(a)
    if N >= 512 :
        a=math.sqrt(a)
    if N >= 1024 :
        a=math.sqrt(a)
    if N >= 2048 :
        a=math.sqrt(a)
    
    res=1

    for i in range(1,int(a)+2):
        if P % i**N: continue
        res = i
        
    return res

print(C(n,p))

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