Buggy python submission (verdict: Runtime Error):
N,P=list(map(int,input().split()))
 
root=P**(1/N)
x=round(root)
 
if n==1:
    print(p)
else:
	for i in range(x):
		if P%((x-i)**N)==0:
			print(x-i)
			break

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

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

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

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

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())
 

if n==1:
    print(p)
else:
    for i in range(round((p**(1/n)+1)),0,-1):        
        if p%i==0:
            if p%(i**2)==0:
                if p%(i**n)==0:
                    print(i)
                    break
 

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())
 

def kouyaku(n,p):
    if n==1:
        return p 
    else:
        for i in range(round((p**(1/n)+1)),0,-1):        
            if p%i==0:
                if p%(i**2)==0:
                    if p%(i**n)==0:
                        return i
                        break
 
            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())
 

def kouyaku(n,p):
    if n==1:
        return p 
    else:
        for i in range(round((p**(1/n)+1)),0,-1):        
            if p%i==0:
                if p%(i**2)==0:
                    if p%(i**n)==0:
                        return i
                        break
 
            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())


def kouyaku(n,p):
    if n==1:
        return p 
    else:
        for i in range(round((p**(1/n)+1)),0,-1):        
            if p%i==0:
                if p%(i**2)==0:
                    if p%(i**n)==0:
                        return i

            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

def kouyaku(n,p):
    for i in range(round((p**(1/n)+1)),0,-1):        
        if p%(i**n)==0:
                return i
            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

def heihou_hantei(n):
    m = int(n**0.5)
    return m if abs(m*m - n) < 1e-6 else 0

def kouyaku(n,p):
    for i in range(round((p**(1/n)+1)),0,-1):        
        if p%i==0:
            if p%(i**n)==0:
                return i
            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

def heihou_hantei(n):
    m = int(n**0.5)
    return m if abs(m*m - n) < 1e-6 else 0

def kouyaku(n,p):
    if n==2:
        for i in range(round(((p**(1/n))/(2**n)+1))): 
            a=heihou_hantei(n)
            if a!=0:
                return a
    
            
    for i in range(round((p**(1/n)+1)),0,-1):        
        if p%i==0:
            if p%(i**n)==0:
                return i
            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

def kouyaku(n,p):
    for i in range(round((p**(1/n)+1)),0,-1):
        if p%i==0:
            if p%(i**n)==0:
                return i
            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

def kouyaku(n,p):
    for i in range(round((p**(1/n)+1)),0,-1):
        if p%(i**n)==0:
            return i
            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

def kouyaku(n,p):
    if n==1:
        return p
    else:
        for i in range(round((p/n)+1),0,-1):
            if p%(i**n)==0:
                return i
            
print(kouyaku(n,p))

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,p=map(int,input().split())

for i in range(p,0,-1):
    if p%(i**n)==0:
        print(i)
        break

Fixed submission:
N, P = map(int, input().split())
ans = 1
 
if N >= 45:
  print(ans)
elif N == 1:
  print(P)
  
 
  
else:
  i = 1
  while(i**N <= P):
    if P % (i**N) == 0:
      ans = i
    i += 1
  print(ans)