output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N P
attempt: from collections import Counter
  import sys
  sys.setrecursionlimit(1000000)
  def bunkai(q):
    res = []
    if q == 1:
      res.append(1)
      return res
    else:
      n_dummy = q
      for i in range(2,int(n_dummy**0.5)+3):
        while n_dummy%i == 0:
          n_dummy //= i
          res.append(i)
      if n_dummy >= 2:
        for i in range(2,int(n_dummy**0.5)+3):
          while n_dummy%i == 0:
            n_dummy //= i
            res.append(i)
      if n_dummy >= 2:
        res.append(n_dummy)
    return res
  def solve():
    n,p = (int(i) for i in input().split())
    ans = 1
    query = bunkai(p)
    %print(query)
    c = Counter(query)
    
    for i in range(len(c.values())):
      number,times = c.most_common()[i]
      if times >= n:
        timestimes = times//n
        ans *= timestimes*number
  
    print(ans)
    
  solve()
problem_description: Statement
  
  There are N integers a_1, a_2, ..., a_N not less than 1. The values of a_1,
  a_2, ..., a_N are not known, but it is known that a_1 \times a_2 \times ...
  \times a_N = P.
  
  Find the maximum possible greatest common divisor of a_1, a_2, ..., a_N.
samples: [{"input": "3 24", "output": "2\n    \n\nThe greatest common divisor would be 2 when, for example, a_1=2, a_2=6 and\na_3=2.\n\n* * *"}, {"input": "5 1", "output": "1\n    \n\nAs a_i are positive integers, the only possible case is a_1 = a_2 = a_3 = a_4\n= a_5 = 1.\n\n* * *"}, {"input": "1 111", "output": "111\n    \n\n* * *"}, {"input": "4 972439611840", "output": "206"}]